class ActiveLdap::Ldif
Attributes
records[R]
version[R]
Public Class Methods
new(records=[])
click to toggle source
# File lib/active_ldap/ldif.rb, line 602 def initialize(records=[]) @version = 1 @records = records end
parse(ldif)
click to toggle source
# File lib/active_ldap/ldif.rb, line 594 def parse(ldif) Parser.new(ldif).parse end
Public Instance Methods
<<(record)
click to toggle source
# File lib/active_ldap/ldif.rb, line 607 def <<(record) @records << record end
==(other)
click to toggle source
# File lib/active_ldap/ldif.rb, line 623 def ==(other) other.is_a?(self.class) and @version == other.version and @records == other.records end
each(&block)
click to toggle source
# File lib/active_ldap/ldif.rb, line 611 def each(&block) @records.each(&block) end
to_s()
click to toggle source
# File lib/active_ldap/ldif.rb, line 615 def to_s result = "version: #{@version}\n" result << @records.collect do |record| record.to_s end.join("\n") result end