Module: Scenarios
- Defined in:
- lib/scenarios.rb,
lib/scenarios/base.rb,
lib/scenarios/scenario.rb
Defined Under Namespace
Class Method Summary collapse
-
.[](k) ⇒ Hash
A particular scenario group.
-
.clear ⇒ Object
Remove all scenario groups.
-
.register(obj) ⇒ Object
Register a Scenario instance with the module.
-
.store ⇒ Hash
The hash of scenario groups.
Class Method Details
.[](k) ⇒ Hash
Returns a particular scenario group.
23 24 25 |
# File 'lib/scenarios.rb', line 23 def self.[](k) self.store[k.to_sym] end |
.clear ⇒ Object
Remove all scenario groups
30 31 32 |
# File 'lib/scenarios.rb', line 30 def self.clear @store = {} end |
.register(obj) ⇒ Object
Register a Scenario instance with the module.
8 9 10 |
# File 'lib/scenarios.rb', line 8 def self.register(obj) store[obj.name.to_sym] = obj end |
.store ⇒ Hash
Returns the hash of scenario groups.
15 16 17 |
# File 'lib/scenarios.rb', line 15 def self.store @store ||= {} end |