Class: Runbook::Statements::Ask
- Inherits:
-
Runbook::Statement
- Object
- Node
- Runbook::Statement
- Runbook::Statements::Ask
- Defined in:
- lib/runbook/statements/ask.rb
Instance Attribute Summary collapse
-
#default ⇒ Object
readonly
Returns the value of attribute default.
-
#echo ⇒ Object
readonly
Returns the value of attribute echo.
-
#into ⇒ Object
readonly
Returns the value of attribute into.
-
#prompt ⇒ Object
readonly
Returns the value of attribute prompt.
Attributes inherited from Runbook::Statement
Instance Method Summary collapse
-
#initialize(prompt, into:, default: nil, echo: true) ⇒ Ask
constructor
A new instance of Ask.
Methods inherited from Runbook::Statement
Methods included from Hooks::Invoker
#_execute_after_hooks, #_execute_around_hooks, #_execute_before_hooks, #invoke_with_hooks
Methods inherited from Node
#dynamic!, #dynamic?, #visited!, #visited?
Constructor Details
#initialize(prompt, into:, default: nil, echo: true) ⇒ Ask
Returns a new instance of Ask.
5 6 7 8 9 10 |
# File 'lib/runbook/statements/ask.rb', line 5 def initialize(prompt, into:, default: nil, echo: true) @prompt = prompt @into = into @default = default @echo = echo end |
Instance Attribute Details
#default ⇒ Object (readonly)
Returns the value of attribute default.
3 4 5 |
# File 'lib/runbook/statements/ask.rb', line 3 def default @default end |
#echo ⇒ Object (readonly)
Returns the value of attribute echo.
3 4 5 |
# File 'lib/runbook/statements/ask.rb', line 3 def echo @echo end |
#into ⇒ Object (readonly)
Returns the value of attribute into.
3 4 5 |
# File 'lib/runbook/statements/ask.rb', line 3 def into @into end |
#prompt ⇒ Object (readonly)
Returns the value of attribute prompt.
3 4 5 |
# File 'lib/runbook/statements/ask.rb', line 3 def prompt @prompt end |