Class: Shared::Collection Abstract
- Includes:
- Enumerable
- Defined in:
- lib/vas/shared/collection.rb
Overview
A dynamic collection of items
Direct Known Subclasses
Gemfire::AgentLiveConfigurations, Gemfire::AgentNodeLiveConfigurations, Gemfire::CacheServerLiveConfigurations, Gemfire::CacheServerNodeLiveConfigurations, Gemfire::LiveApplicationCodes, Gemfire::LocatorLiveConfigurations, Gemfire::LocatorNodeLiveConfigurations, Gemfire::Nodes, RabbitMq::LiveConfigurations, RabbitMq::NodeLiveConfigurations, RabbitMq::Nodes, MutableCollection, NodeInstances, Sqlfire::AgentLiveConfigurations, Sqlfire::AgentNodeLiveConfigurations, Sqlfire::LocatorLiveConfigurations, Sqlfire::LocatorNodeLiveConfigurations, Sqlfire::Nodes, Sqlfire::ServerLiveConfigurations, Sqlfire::ServerNodeLiveConfigurations, TcServer::LiveConfigurations, TcServer::NodeApplications, TcServer::NodeLiveConfigurations, TcServer::NodeRevisions, TcServer::Nodes, WebServer::LiveConfigurations, WebServer::NodeLiveConfigurations, WebServer::Nodes
Instance Attribute Summary
Attributes inherited from Resource
Instance Method Summary collapse
-
#each {|item| ... } ⇒ void
Calls the block once for each item in the collection.
-
#initialize(location, client, type, entry_class) ⇒ Collection
constructor
A new instance of Collection.
- #reload ⇒ Object
Constructor Details
#initialize(location, client, type, entry_class) ⇒ Collection
Returns a new instance of Collection.
31 32 33 34 35 |
# File 'lib/vas/shared/collection.rb', line 31 def initialize(location, client, type, entry_class) @type = type @entry_class = entry_class super(location, client) end |
Instance Method Details
#each {|item| ... } ⇒ void
This method returns an undefined value.
Calls the block once for each item in the collection.
47 48 49 50 |
# File 'lib/vas/shared/collection.rb', line 47 def each @items ||= create_collection_entries @items.each { |item| yield item } end |
#reload ⇒ Object
37 38 39 40 |
# File 'lib/vas/shared/collection.rb', line 37 def reload super @items = nil end |