Class Index [+]

Quicksearch

ActiveLdap::Schema::Syntax

Attributes

length[R]

Public Class Methods

new(id, schema) click to toggle source
     # 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

Public Instance Methods

<=>(other) click to toggle source
     # File lib/active_ldap/schema.rb, line 364
364:       def <=>(other)
365:         id <=> other.id
366:       end
binary_transfer_required?() click to toggle source
     # File lib/active_ldap/schema.rb, line 328
328:       def binary_transfer_required?
329:         @binary_transfer_required
330:       end
human_readable?() click to toggle source
     # File lib/active_ldap/schema.rb, line 332
332:       def human_readable?
333:         @human_readable
334:       end
normalize_value(value) click to toggle source
     # 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
to_param() click to toggle source
     # File lib/active_ldap/schema.rb, line 368
368:       def to_param
369:         id
370:       end
type_cast(value) click to toggle source
     # 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
valid?(value) click to toggle source
     # File lib/active_ldap/schema.rb, line 336
336:       def valid?(value)
337:         validate(value).nil?
338:       end
validate(value) click to toggle source
     # File lib/active_ldap/schema.rb, line 340
340:       def validate(value)
341:         if @validator
342:           @validator.validate(value)
343:         else
344:           nil
345:         end
346:       end

Private Instance Methods

attribute(attribute_name, name=@name) click to toggle source
     # 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
collect_info() click to toggle source
     # 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.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.