Class ActiveLdap::Ldif::ChangeRecord::Control
In: lib/active_ldap/ldif.rb
Parent: Object
Error AttributeAssignmentError AdapterNotSpecified OperationNotPermitted RequiredObjectClassMissed ConnectionError RequiredAttributeMissed LdifInvalid LdapError DistinguishedNameNotSetError EntryNotFound SaveError StrongAuthenticationRequired AdapterNotFound ConnectionNotEstablished TimeoutError AuthenticationError AttributeValueInvalid EntryNotSaved DistinguishedNameInputInvalid EntryAlreadyExist ObjectClassError UnknownAttribute EntryInvalid DeleteError ConfigurationError DistinguishedNameInvalid DistinguishedName Base Reloadable::Deprecated Reloadable::Subclasses Enumerable Ldif Collection EntryAttribute StandardError Children HasManyWrap HasMany BelongsToMany Proxy BelongsTo Common Find LDIF Delete Update Normalizable GetText Parser ActiveRecord::Callbacks ActiveRecord::Validations Base\n[lib/active_ldap/adapter/base.rb\nlib/active_ldap/adapter/jndi.rb\nlib/active_ldap/adapter/ldap.rb\nlib/active_ldap/adapter/net_ldap.rb] Jndi Ldap NetLdap GetTextSupport Schema\n[lib/active_ldap/schema.rb\nlib/active_ldap/schema/syntaxes.rb] JndiConnection lib/active_ldap/distinguished_name.rb lib/active_ldap/base.rb lib/active_ldap/schema.rb lib/active_ldap/entry_attribute.rb lib/active_ldap/ldif.rb lib/active_ldap/ldap_error.rb ClassMethods Associations LdapBenchmarking ActionController Populate lib/active_ldap/association/has_many_wrap.rb lib/active_ldap/association/children.rb lib/active_ldap/association/collection.rb lib/active_ldap/association/proxy.rb lib/active_ldap/association/belongs_to_many.rb lib/active_ldap/association/belongs_to.rb lib/active_ldap/association/has_many.rb HasManyUtils Association ClassMethods Tree Acts Command Update Common ModifyNameRecordLoadable AddOperationModifiable DeleteOperationModifiable ReplaceOperationModifiable ModifyRecordLoadable DeleteRecordLoadable AddRecordLoadable ContentRecordLoadable LDIF Delete Find Operations GetTextSupport Escape ClassMethods Normalizable Attributes ClassMethods Configuration ClassMethods ObjectClass lib/active_ldap/get_text/parser.rb GetText ClassMethods Callbacks Validations lib/active_ldap/adapter/jndi_connection.rb lib/active_ldap/adapter/net_ldap.rb lib/active_ldap/adapter/ldap.rb lib/active_ldap/adapter/jndi.rb Adapter Helper GetTextFallback ClassMethods HumanReadable Salt UserPassword ClassMethods Connection ActiveLdap dot/m_44_0.png

Methods

==   criticality?   new   normalize_criticality   to_a   to_hash   to_s  

Attributes

type  [R] 
value  [R] 

Public Class methods

[Source]

     # File lib/active_ldap/ldif.rb, line 690
690:         def initialize(type, criticality, value)
691:           @type = type
692:           @criticality = normalize_criticality(criticality)
693:           @value = value
694:         end

Public Instance methods

[Source]

     # File lib/active_ldap/ldif.rb, line 720
720:         def ==(other)
721:           other.is_a?(self.class) and
722:             @type == other.type and
723:             @criticality = other.criticality and
724:             @value == other.value
725:         end

[Source]

     # File lib/active_ldap/ldif.rb, line 696
696:         def criticality?
697:           @criticality
698:         end

[Source]

     # File lib/active_ldap/ldif.rb, line 700
700:         def to_a
701:           [@type, @criticality, @value]
702:         end

[Source]

     # File lib/active_ldap/ldif.rb, line 704
704:         def to_hash
705:           {
706:             :type => @type,
707:             :criticality => @criticality,
708:             :value => @value,
709:           }
710:         end

[Source]

     # File lib/active_ldap/ldif.rb, line 712
712:         def to_s
713:           result = "control: #{@type}"
714:           result << " #{@criticality}" unless @criticality.nil?
715:           result << @value if @value
716:           result << "\n"
717:           result
718:         end

Private Instance methods

[Source]

     # File lib/active_ldap/ldif.rb, line 728
728:         def normalize_criticality(criticality)
729:           case criticality
730:           when "true", true
731:             true
732:           when "false", false
733:             false
734:           when nil
735:             nil
736:           else
737:             raise ArgumentError,
738:                   _("invalid criticality value: %s") % criticality.inspect
739:           end
740:         end

[Validate]