class BehaveFun::Decorators::Repeat
Constants
- ParamsSchema
Attributes
counter[RW]
Public Instance Methods
child_fail()
click to toggle source
# File lib/behave_fun/decorators/repeat.rb, line 22 def child_fail child_success end
child_success()
click to toggle source
# File lib/behave_fun/decorators/repeat.rb, line 10 def child_success return @children[0].reset unless params[:times] @counter += 1 if @counter < params[:times] @children[0].reset execute else success end end
params=(params)
click to toggle source
# File lib/behave_fun/decorators/repeat.rb, line 30 def params=(params) @params = ParamsSchema[params] end
serializable_status_fields()
click to toggle source
# File lib/behave_fun/decorators/repeat.rb, line 26 def serializable_status_fields [:counter] end
start()
click to toggle source
Calls superclass method
# File lib/behave_fun/decorators/repeat.rb, line 5 def start super @counter = 0 end