Class: LeafTasks::Wait
- Inherits:
-
Task
- Object
- Task
- LeafTasks::Wait
- Defined in:
- lib/behave_fun/leaf_tasks/wait.rb
Constant Summary collapse
Instance Attribute Summary collapse
-
#counter ⇒ Object
Returns the value of attribute counter.
Instance Method Summary collapse
Instance Attribute Details
#counter ⇒ Object
Returns the value of attribute counter.
3 4 5 |
# File 'lib/behave_fun/leaf_tasks/wait.rb', line 3 def counter @counter end |
Instance Method Details
#execute ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/behave_fun/leaf_tasks/wait.rb', line 10 def execute if @counter < params[:duration] @counter += 1 running else success end end |
#params=(params) ⇒ Object
23 24 25 |
# File 'lib/behave_fun/leaf_tasks/wait.rb', line 23 def params=(params) @params = ParamsSchema[params] end |
#serializable_status_fields ⇒ Object
19 20 21 |
# File 'lib/behave_fun/leaf_tasks/wait.rb', line 19 def serializable_status_fields [:counter] end |
#start ⇒ Object
5 6 7 8 |
# File 'lib/behave_fun/leaf_tasks/wait.rb', line 5 def start super @counter = 0 end |