class ActiveLdap::Schema::Syntax
def <=>(other)
def <=>(other) id <=> other.id end
def attribute(attribute_name, name=@name)
def attribute(attribute_name, name=@name) @schema.ldap_syntax_attribute(name, attribute_name) end
def binary?
def binary? return true if @built_in_syntax and @built_in_syntax.binary? binary_transfer_required? or !human_readable? end
def binary_transfer_required?
def binary_transfer_required? @binary_transfer_required end
def collect_info
def collect_info @description = attribute("DESC")[0] @binary_transfer_required = (attribute('X-BINARY-TRANSFER-REQUIRED')[0] == 'TRUE') @human_readable = (attribute('X-NOT-HUMAN-READABLE')[0] != 'TRUE') end
def human_readable?
def human_readable? @human_readable end
def initialize(id, schema)
def initialize(id, schema) if /\{(\d+)\}\z/ =~ id id = $PREMATCH @length = Integer($1) else @length = nil end super(id, schema, "ldapSyntaxes") @id = id @name = nil if @name == @id @built_in_syntax = Syntaxes[@id] end
def normalize_value(value)
def normalize_value(value) if @built_in_syntax @built_in_syntax.normalize_value(value) else value end end
def to_param
def to_param id end
def type_cast(value)
def type_cast(value) if @built_in_syntax @built_in_syntax.type_cast(value) else value end end
def valid?(value)
def valid?(value) validate(value).nil? end
def validate(value)
def validate(value) if @built_in_syntax @built_in_syntax.validate(value) else nil end end