Class: Ankit::Challenge::MessageState
- Includes:
- SlashRecognizing
- Defined in:
- lib/ankit/challenge.rb
Instance Attribute Summary
Attributes inherited from State
Instance Method Summary collapse
-
#initialize(progress, message) ⇒ MessageState
constructor
A new instance of MessageState.
- #pump ⇒ Object
Methods included from SlashRecognizing
Methods inherited from State
#ask, #erase_last, #keep_pumping_until, #line, #over?, #runtime, #say, #session, #show_and_ask_enter, #show_breaking_status, #show_summary_header
Constructor Details
#initialize(progress, message) ⇒ MessageState
Returns a new instance of MessageState.
332 333 334 335 |
# File 'lib/ankit/challenge.rb', line 332 def initialize(progress, ) super(progress) @message = end |
Instance Method Details
#pump ⇒ Object
337 338 339 340 341 342 343 |
# File 'lib/ankit/challenge.rb', line 337 def pump say(@message, :fail) # XXX: should :error answered = ask().strip pump_slash_or(answered) do pump_slash(answered) end end |