Class: Spielbash::MessageAction
- Inherits:
-
BaseAction
- Object
- BaseAction
- Spielbash::MessageAction
- Defined in:
- lib/spielbash/model/action/message_action.rb
Instance Attribute Summary collapse
-
#message ⇒ Object
Returns the value of attribute message.
Attributes inherited from BaseAction
Instance Method Summary collapse
- #execute(session) ⇒ Object
-
#initialize(message, action_context) ⇒ MessageAction
constructor
A new instance of MessageAction.
Constructor Details
#initialize(message, action_context) ⇒ MessageAction
5 6 7 8 |
# File 'lib/spielbash/model/action/message_action.rb', line 5 def initialize(, action_context) super(action_context) = end |
Instance Attribute Details
#message ⇒ Object
Returns the value of attribute message.
3 4 5 |
# File 'lib/spielbash/model/action/message_action.rb', line 3 def end |
Instance Method Details
#execute(session) ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'lib/spielbash/model/action/message_action.rb', line 10 def execute(session) .each_char do |c| session.send_key(c) sleep(action_context.typing_delay_s) end sleep(action_context.reading_delay_s) session.send_key('C-h', .length) if (action_context.delete) end |