Class: Roulette::EachStore
- Inherits:
-
Object
- Object
- Roulette::EachStore
- Defined in:
- lib/roulette/each_store.rb
Instance Attribute Summary collapse
-
#stores ⇒ Object
Returns the value of attribute stores.
Instance Method Summary collapse
-
#initialize(stores) ⇒ EachStore
constructor
A new instance of EachStore.
- #method_missing(method_name, *args, &blk) ⇒ Object
Constructor Details
#initialize(stores) ⇒ EachStore
Returns a new instance of EachStore.
4 5 6 |
# File 'lib/roulette/each_store.rb', line 4 def initialize(stores) self.stores = stores end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_name, *args, &blk) ⇒ Object
8 9 10 11 12 |
# File 'lib/roulette/each_store.rb', line 8 def method_missing(method_name, *args, &blk) stores.collect do |store| store.send method_name, *args end end |
Instance Attribute Details
#stores ⇒ Object
Returns the value of attribute stores.
2 3 4 |
# File 'lib/roulette/each_store.rb', line 2 def stores @stores end |