Class: StatusManager::StatusStoreList
- Inherits:
-
Object
- Object
- StatusManager::StatusStoreList
- Defined in:
- lib/status-manager/status_store.rb
Instance Attribute Summary collapse
-
#status_stores ⇒ Object
Returns the value of attribute status_stores.
Instance Method Summary collapse
- #add(status_store) ⇒ Object
- #get(attribute) ⇒ Object
-
#initialize ⇒ StatusStoreList
constructor
A new instance of StatusStoreList.
Constructor Details
#initialize ⇒ StatusStoreList
Returns a new instance of StatusStoreList.
5 6 7 |
# File 'lib/status-manager/status_store.rb', line 5 def initialize @status_stores = [] end |
Instance Attribute Details
#status_stores ⇒ Object
Returns the value of attribute status_stores.
3 4 5 |
# File 'lib/status-manager/status_store.rb', line 3 def status_stores @status_stores end |
Instance Method Details
#add(status_store) ⇒ Object
9 10 11 |
# File 'lib/status-manager/status_store.rb', line 9 def add(status_store) @status_stores << status_store end |
#get(attribute) ⇒ Object
13 14 15 |
# File 'lib/status-manager/status_store.rb', line 13 def get(attribute) @status_stores.select { |status_store| status_store.attribute_name == attribute }.first end |