Class: RBehave::StepMother

Inherits:
Object
  • Object
show all
Defined in:
lib/rbehave/step_mother.rb

Instance Method Summary collapse

Constructor Details

#initializeStepMother

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