Class Index [+]

Quicksearch

ActiveLdap::Schema::ObjectClass

Constants

UNWRITABLE_MUST_ATTRIBUTES

Attributes

super_classes[R]

Public Class Methods

new(name, schema) click to toggle source
     # File lib/active_ldap/schema.rb, line 620
620:       def initialize(name, schema)
621:         super(name, schema, "objectClasses")
622:       end

Public Instance Methods

may(include_super_class=true) click to toggle source
     # File lib/active_ldap/schema.rb, line 636
636:       def may(include_super_class=true)
637:         if include_super_class
638:           @all_may
639:         else
640:           @may
641:         end
642:       end
must(include_super_class=true) click to toggle source
     # File lib/active_ldap/schema.rb, line 628
628:       def must(include_super_class=true)
629:         if include_super_class
630:           @all_must
631:         else
632:           @must
633:         end
634:       end
super_class?(object_class) click to toggle source
     # File lib/active_ldap/schema.rb, line 624
624:       def super_class?(object_class)
625:         @super_classes.include?(object_class)
626:       end

Private Instance Methods

attribute(attribute_name, name=@name) click to toggle source
     # File lib/active_ldap/schema.rb, line 691
691:       def attribute(attribute_name, name=@name)
692:         @schema.object_class_attribute(name, attribute_name) +
693:           @schema.dit_content_rule_attribute(name, attribute_name)
694:       end
collect_attributes() click to toggle source
     # File lib/active_ldap/schema.rb, line 670
670:       def collect_attributes
671:         must = attribute('MUST').reject do |name|
672:           UNWRITABLE_MUST_ATTRIBUTES.include?(name)
673:         end.uniq
674:         must = must.collect {|name| @schema.attribute(name)}
675:         may = attribute('MAY').uniq.collect {|name| @schema.attribute(name)}
676: 
677:         all_must = must.dup
678:         all_may = may.dup
679:         @super_classes.each do |super_class|
680:           all_must.concat(super_class.must(false))
681:           all_may.concat(super_class.may(false))
682:         end
683: 
684:         # Clean out the dupes.
685:         all_must.uniq!
686:         all_may.uniq!
687: 
688:         [must, may, all_must, all_may]
689:       end
collect_info() click to toggle source
     # File lib/active_ldap/schema.rb, line 645
645:       def collect_info
646:         @description = attribute("DESC")[0]
647:         @super_classes = collect_super_classes
648:         @must, @may, @all_must, @all_may = collect_attributes
649:       end
collect_super_classes() click to toggle source
     # File lib/active_ldap/schema.rb, line 651
651:       def collect_super_classes
652:         super_classes = attribute('SUP')
653:         loop do
654:           start_size = super_classes.size
655:           new_super_classes = []
656:           super_classes.each do |super_class|
657:             new_super_classes.concat(attribute('SUP', super_class))
658:           end
659: 
660:           super_classes.concat(new_super_classes)
661:           super_classes.uniq!
662:           break if super_classes.size == start_size
663:         end
664:         super_classes.collect do |name|
665:           @schema.object_class(name)
666:         end
667:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.