Class: RBehave::StepMother
- Inherits:
-
Object
- Object
- RBehave::StepMother
- Defined in:
- lib/rbehave/step_mother.rb
Instance Method Summary collapse
- #find(type, name) ⇒ Object
-
#initialize ⇒ StepMother
constructor
A new instance of StepMother.
- #store(type, name, step) ⇒ Object
Constructor Details
#initialize ⇒ StepMother
Returns a new instance of StepMother.
3 4 5 6 7 8 9 |
# File 'lib/rbehave/step_mother.rb', line 3 def initialize @steps = Hash.new do |hsh,key| hsh[key] = Hash.new do |hsh,key| raise UnknownStepException, key end end end |
Instance Method Details
#find(type, name) ⇒ Object
15 16 17 |
# File 'lib/rbehave/step_mother.rb', line 15 def find(type, name) @steps[type][name] end |
#store(type, name, step) ⇒ Object
11 12 13 |
# File 'lib/rbehave/step_mother.rb', line 11 def store(type, name, step) @steps[type][name] = step end |