Class: Spielbash::PauseAction
- Inherits:
-
BaseAction
- Object
- BaseAction
- Spielbash::PauseAction
- Defined in:
- lib/spielbash/model/action/pause_action.rb
Instance Attribute Summary collapse
-
#length ⇒ Object
Returns the value of attribute length.
Attributes inherited from BaseAction
Instance Method Summary collapse
- #execute(_session) ⇒ Object
-
#initialize(length, action_context) ⇒ PauseAction
constructor
A new instance of PauseAction.
Constructor Details
#initialize(length, action_context) ⇒ PauseAction
Returns a new instance of PauseAction.
5 6 7 8 |
# File 'lib/spielbash/model/action/pause_action.rb', line 5 def initialize(length, action_context) super(action_context) @length = length end |
Instance Attribute Details
#length ⇒ Object
Returns the value of attribute length.
3 4 5 |
# File 'lib/spielbash/model/action/pause_action.rb', line 3 def length @length end |
Instance Method Details
#execute(_session) ⇒ Object
10 11 12 |
# File 'lib/spielbash/model/action/pause_action.rb', line 10 def execute(_session) sleep(length) end |