Class: Terrestrial::ObjectStore
- Inherits:
-
Object
- Object
- Terrestrial::ObjectStore
- Includes:
- Fetchable, InspectionString
- Defined in:
- lib/terrestrial/public_conveniencies.rb
Instance Method Summary collapse
- #[](mapping_name) ⇒ Object
- #from(mapping_name) ⇒ Object
-
#initialize(stores) ⇒ ObjectStore
constructor
A new instance of ObjectStore.
Methods included from InspectionString
Constructor Details
#initialize(stores) ⇒ ObjectStore
Returns a new instance of ObjectStore.
15 16 17 18 |
# File 'lib/terrestrial/public_conveniencies.rb', line 15 def initialize(stores) @mappings = stores.keys @stores = stores end |
Instance Method Details
#[](mapping_name) ⇒ Object
20 21 22 |
# File 'lib/terrestrial/public_conveniencies.rb', line 20 def [](mapping_name) @stores[mapping_name] end |
#from(mapping_name) ⇒ Object
24 25 26 |
# File 'lib/terrestrial/public_conveniencies.rb', line 24 def from(mapping_name) fetch(mapping_name) end |