Method: Net::LDAP::Entry#each

Defined in:
lib/net/ldap/entry.rb

#eachObject Also known as: each_attribute

Accesses each of the attributes present in the Entry. Calls a user-supplied block with each attribute in turn, passing two arguments to the block: a Symbol giving the name of the attribute, and a (possibly empty) Array of data values.


119
120
121
122
123
124
125
126
# File 'lib/net/ldap/entry.rb', line 119

def each
  if block_given?
    attribute_names.each {|a|
      attr_name,values = a,self[a]
      yield attr_name, values
    }
  end
end