Module: StepMaker
- Defined in:
- lib/acceptance_test/step_maker.rb
Instance Attribute Summary collapse
-
#input ⇒ Object
readonly
Returns the value of attribute input.
Instance Method Summary collapse
Instance Attribute Details
#input ⇒ Object (readonly)
Returns the value of attribute input.
3 4 5 |
# File 'lib/acceptance_test/step_maker.rb', line 3 def input @input end |
Instance Method Details
#initialize(*params) ⇒ Object
5 6 7 8 9 |
# File 'lib/acceptance_test/step_maker.rb', line 5 def initialize *params @input = {} super end |
#step(title) {|values| ... } ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/acceptance_test/step_maker.rb', line 11 def step title values = [] params = title.gsub(/:\w+/) params.each do |param| key = param.gsub(":", "").to_sym values << input[key] if input[key] end yield *values if block_given? end |