Method: Orchestrate::Collection#each

Defined in:
lib/orchestrate/collection.rb

#eachEnumerator #each {|key_value| ... } ⇒ Object

Iterates over each KeyValue item in the collection. Used as the basis for Enumerable methods. Items are provided in lexicographically sorted order by key name.

Examples:

keys = collection.take(20).map(&:key)
# returns the first 20 keys in the collection.

Overloads:

  • #eachEnumerator

    Returns:

    • (Enumerator)
  • #each {|key_value| ... } ⇒ Object

    Yield Parameters:

See Also:



191
192
193
# File 'lib/orchestrate/collection.rb', line 191

def each(&block)
  KeyValueList.new(self).each(&block)
end