Class: Konamio::Prompt
Instance Method Summary collapse
- #execute! ⇒ Object
-
#initialize(options) ⇒ Prompt
constructor
A new instance of Prompt.
- #prompt ⇒ Object
Constructor Details
#initialize(options) ⇒ Prompt
Returns a new instance of Prompt.
3 4 5 6 7 8 9 |
# File 'lib/konamio/prompt.rb', line 3 def initialize() = { output: $stdout }.merge() (:output, :prompt, ) end |
Instance Method Details
#execute! ⇒ Object
11 12 13 14 |
# File 'lib/konamio/prompt.rb', line 11 def execute! prompt return Konamio::Result.new(success: true, data: { prompted: @prompt }) end |
#prompt ⇒ Object
16 17 18 |
# File 'lib/konamio/prompt.rb', line 16 def prompt @output.puts @prompt end |