Class: ActiveLdap::Schema::Syntaxes::DistinguishedName
- Inherits:
-
Base
- Object
- Base
- ActiveLdap::Schema::Syntaxes::DistinguishedName
show all
- Defined in:
- lib/active_ldap/schema/syntaxes.rb
Constant Summary
Constants inherited
from Base
Base::PRINTABLE_CHARACTER, Base::SYNTAXES, Base::UNPRINTABLE_CHARACTER
Instance Method Summary
collapse
Methods inherited from Base
#valid?, #validate
included
Instance Method Details
#normalize_value(value) ⇒ Object
137
138
139
140
141
142
143
|
# File 'lib/active_ldap/schema/syntaxes.rb', line 137
def normalize_value(value)
if value.is_a?(DN)
value.to_s
else
value
end
end
|
#type_cast(value) ⇒ Object
130
131
132
133
134
135
|
# File 'lib/active_ldap/schema/syntaxes.rb', line 130
def type_cast(value)
return nil if value.nil?
DN.parse(value)
rescue DistinguishedNameInvalid
value
end
|