Class: Scenario::Scenarios
- Inherits:
-
Object
- Object
- Scenario::Scenarios
- Defined in:
- lib/scenario/scenario.rb
Class Method Summary collapse
-
.for(name) ⇒ Object
Get the scenario module for the given name.
-
.register(name, modul) ⇒ Object
Add a new scenario.
Class Method Details
.for(name) ⇒ Object
Get the scenario module for the given name.
14 15 16 |
# File 'lib/scenario/scenario.rb', line 14 def self.for( name ) @@scenarios[name.to_sym] || ( raise "No scenario named #{name.inspect}." ) end |
.register(name, modul) ⇒ Object
Add a new scenario.
8 9 10 11 |
# File 'lib/scenario/scenario.rb', line 8 def self.register( name, modul ) @@scenarios ||= {} @@scenarios[name.to_sym] = modul end |