# File lib/net/ldap/dataset.rb, line 81 81: def to_ldif 82: ary = [] 83: ary += (@comments || []) 84: 85: keys.sort.each {|dn| 86: ary << "dn: #{dn}" 87: 88: self[dn].keys.map {|sym| sym.to_s}.sort.each {|attr| 89: self[dn][attr.intern].each {|val| 90: ary << "#{attr}: #{val}" 91: } 92: } 93: 94: ary << "" 95: } 96: 97: block_given? and ary.each {|line| yield line} 98: 99: ary 100: end