Class: Ldaptic::Schema::AttributeType

Inherits:
NameDescObsoleteDefiniton show all
Defined in:
lib/ldaptic/schema.rb

Instance Attribute Summary

Attributes inherited from AbstractDefinition

#attributes, #oid

Instance Method Summary collapse

Methods inherited from NameDescObsoleteDefiniton

#names, #verbose_name

Methods inherited from AbstractDefinition

attr_ldap_boolean, attr_ldap_reader, #initialize, #inspect, #to_s

Constructor Details

This class inherits a constructor from Ldaptic::Schema::AbstractDefinition

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Ldaptic::Schema::AbstractDefinition

Instance Method Details

#matchable(value) ⇒ Object



204
205
206
# File 'lib/ldaptic/schema.rb', line 204

def matchable(value)
  Ldaptic::MatchingRules.for(equality).new.matchable(Ldaptic.encode(value))
end

#syntax_attributeObject



190
191
192
# File 'lib/ldaptic/schema.rb', line 190

def syntax_attribute
  @attributes[:syntax]
end

#syntax_lenObject



196
197
198
# File 'lib/ldaptic/schema.rb', line 196

def syntax_len
  syntax_attribute && syntax_attribute[/\{(.*)\}/, 1].to_i
end

#syntax_object(*args) ⇒ Object Also known as: syntax



199
200
201
# File 'lib/ldaptic/schema.rb', line 199

def syntax_object(*args)
  Ldaptic::SYNTAXES[syntax_oid]
end

#syntax_oidObject



193
194
195
# File 'lib/ldaptic/schema.rb', line 193

def syntax_oid
  syntax_attribute && syntax_attribute[/[0-9.]+/]
end