# File lib/active_ldap/schema.rb, line 392 def initialize(name, schema) super(name, schema, "attributeTypes") end
binary?
Returns true if the given attribute's syntax is X-NOT-HUMAN-READABLE or X-BINARY-TRANSFER-REQUIRED
# File lib/active_ldap/schema.rb, line 417 def binary? @binary end
binary_required?
Returns true if the value MUST be transferred in binary
# File lib/active_ldap/schema.rb, line 424 def binary_required? @binary_required end
directory_operation?
Returns true if an attribute is directory operation. It means that USAGE contains directoryOperation.
# File lib/active_ldap/schema.rb, line 432 def directory_operation? @directory_operation end
# File lib/active_ldap/schema.rb, line 471 def human_attribute_description self.class.human_attribute_description(self) end
# File lib/active_ldap/schema.rb, line 467 def human_attribute_name self.class.human_attribute_name(self) end
# File lib/active_ldap/schema.rb, line 459 def normalize_value(value) normalize_value_internal(value, false) end
read_only?
Returns true if an attribute is read-only NO-USER-MODIFICATION
# File lib/active_ldap/schema.rb, line 400 def read_only? @read_only end
single_value?
Returns true if an attribute can only have one value defined SINGLE-VALUE
# File lib/active_ldap/schema.rb, line 409 def single_value? @single_value end
# File lib/active_ldap/schema.rb, line 436 def syntax @derived_syntax end
# File lib/active_ldap/schema.rb, line 463 def syntax_description send_to_syntax(nil, :description) end
# File lib/active_ldap/schema.rb, line 475 def to_hash { :read_only => read_only?, :single_value => single_value?, :binary => binary?, :binary_required => binary_required?, :directory_operation => directory_operation?, :syntax => syntax, :syntax_description => syntax_description, } end
# File lib/active_ldap/schema.rb, line 455 def type_cast(value) send_to_syntax(value, :type_cast, value) end
# File lib/active_ldap/schema.rb, line 440 def valid?(value) validate(value).nil? end
# File lib/active_ldap/schema.rb, line 444 def validate(value) error_info = validate_each_value(value) return error_info if error_info begin normalize_value(value) nil rescue AttributeValueInvalid [$!.message] end end