Module ActiveLdap::Compatible
In: lib/active_ldap/compatible.rb
Error AttributeAssignmentError AdapterNotSpecified OperationNotPermitted RequiredObjectClassMissed ConnectionError RequiredAttributeMissed LdifInvalid DistinguishedNameNotSetError EntryNotFound LdapError SaveError StrongAuthenticationRequired NotImplemented AdapterNotFound TimeoutError AuthenticationError AttributeValueInvalid EntryNotSaved DistinguishedNameInputInvalid EntryAlreadyExist ObjectClassError UnknownAttribute EntryInvalid DeleteError ConfigurationError ConnectionNotSetup DistinguishedNameInvalid Schema\n[lib/active_ldap/schema.rb\nlib/active_ldap/schema/syntaxes.rb] Base DistinguishedName Reloadable::Deprecated Reloadable::Subclasses Enumerable Ldif Collection EntryAttribute StandardError Children HasManyWrap HasMany BelongsToMany Proxy BelongsTo Normalizable Common Find LDIF Delete Update ActiveRecord::Callbacks GetText Parser 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 ActiveRecord::Validations Xml JndiConnection lib/active_ldap/distinguished_name.rb lib/active_ldap/base.rb lib/active_ldap/xml.rb lib/active_ldap/schema.rb lib/active_ldap/entry_attribute.rb lib/active_ldap/ldif.rb lib/active_ldap/ldap_error.rb Compatible 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 ClassMethods Normalizable Attributes Update Common ModifyNameRecordLoadable AddOperationModifiable DeleteOperationModifiable ReplaceOperationModifiable ModifyRecordLoadable DeleteRecordLoadable AddRecordLoadable ContentRecordLoadable LDIF Delete Find Operations GetTextSupport Escape ClassMethods Configuration ClassMethods ObjectClass ClassMethods Callbacks lib/active_ldap/get_text/parser.rb GetText lib/active_ldap/adapter/jndi_connection.rb lib/active_ldap/adapter/net_ldap.rb lib/active_ldap/adapter/ldap.rb lib/active_ldap/adapter/base.rb lib/active_ldap/adapter/jndi.rb Adapter Validations GetTextFallback Helper ClassMethods HumanReadable Salt UserPassword ClassMethods Connection ActiveLdap dot/m_46_0.png

Methods

Public Instance methods

[Source]

    # File lib/active_ldap/compatible.rb, line 5
 5:       def convert_to_utf8_encoded_object(object)
 6:         case object
 7:         when Array
 8:           object.collect {|element| convert_to_utf8_encoded_object(element)}
 9:         when Hash
10:           encoded = {}
11:           object.each do |key, value|
12:             key = convert_to_utf8_encoded_object(key)
13:             value = convert_to_utf8_encoded_object(value)
14:             encoded[key] = value
15:           end
16:           encoded
17:         when String
18:           encoded = object.dup
19:           encoded.force_encoding("utf-8")
20:           encoded = object unless encoded.valid_encoding?
21:           encoded
22:         else
23:           object
24:         end
25:       end

[Source]

    # File lib/active_ldap/compatible.rb, line 27
27:       def convert_to_utf8_encoded_object(object)
28:         object
29:       end

[Source]

    # File lib/active_ldap/compatible.rb, line 33
33:       def string_to_lines(string)
34:         string.lines.to_a
35:       end

[Source]

    # File lib/active_ldap/compatible.rb, line 37
37:       def string_to_lines(string)
38:         ary = []
39:         string.each_line{|l| ary << l}
40:         ary
41:       end

[Validate]