# File lib/active_ldap/schema.rb, line 315
315: def initialize(id, schema)
316: if /\{(\d+)\}\z/ =~ id
317: id = $PREMATCH
318: @length = Integer($1)
319: else
320: @length = nil
321: end
322: super(id, schema, "ldapSyntaxes")
323: @id = id
324: @name = nil if @name == @id
325: @validator = Syntaxes[@id]
326: end
# File lib/active_ldap/schema.rb, line 364
364: def <=>(other)
365: id <=> other.id
366: end
# File lib/active_ldap/schema.rb, line 328
328: def binary_transfer_required?
329: @binary_transfer_required
330: end
# File lib/active_ldap/schema.rb, line 332
332: def human_readable?
333: @human_readable
334: end
# File lib/active_ldap/schema.rb, line 356
356: def normalize_value(value)
357: if @validator
358: @validator.normalize_value(value)
359: else
360: value
361: end
362: end
# File lib/active_ldap/schema.rb, line 368
368: def to_param
369: id
370: end
# File lib/active_ldap/schema.rb, line 348
348: def type_cast(value)
349: if @validator
350: @validator.type_cast(value)
351: else
352: value
353: end
354: end
# File lib/active_ldap/schema.rb, line 373
373: def attribute(attribute_name, name=@name)
374: @schema.ldap_syntax_attribute(name, attribute_name)
375: end
# File lib/active_ldap/schema.rb, line 377
377: def collect_info
378: @description = attribute("DESC")[0]
379: @binary_transfer_required =
380: (attribute('X-BINARY-TRANSFER-REQUIRED')[0] == 'TRUE')
381: @human_readable = (attribute('X-NOT-HUMAN-READABLE')[0] != 'TRUE')
382: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.