Class: Shared::Collection

Inherits:
Resource show all
Defined in:
lib/vas/shared/collection.rb

Instance Attribute Summary

Attributes inherited from Resource

#location, #security

Instance Method Summary collapse

Instance Method Details

#eachObject

Gets the items in the collection from the server. Calls the block once for each item.



34
35
36
37
38
39
40
41
42
# File 'lib/vas/shared/collection.rb', line 34

def each # :yields: item
  items = client.get(location)[@type]

  if (!items.nil?)
    client.get(location)[@type].each { |item|
      yield entry_class.new(Util::LinkUtils.get_self_link_href(item), client)
    }
  end
end