Method: LDAP::Server::Schema::AttributeType#initialize
- Defined in:
- lib/ldap/server/schema.rb
#initialize(str) ⇒ AttributeType
Returns a new instance of AttributeType.
455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 |
# File 'lib/ldap/server/schema.rb', line 455 def initialize(str) m = LDAP::Server::Syntax::AttributeTypeDescription.match(str) raise LDAP::ResultError::InvalidAttributeSyntax, "Bad AttributeTypeDescription #{str.inspect}" unless m @oid = m[1] @names = (m[2]||"").scan(/'(.*?)'/).flatten @desc = m[3] @obsolete = ! m[4].nil? @sup = m[5] @equality = m[6] @ordering = m[7] @substr = m[8] @syntax = m[9] @maxlen = m[10] && m[10].to_i @singlevalue = ! m[11].nil? @collective = ! m[12].nil? @nousermod = ! m[13].nil? @usage = m[14] && m[14].intern # This is the cache of the stringified version. Rather than # initialize to str, we set nil to force it to be rebuilt @def = nil end |