Class: OKF::TUI::App::Prompt
- Inherits:
-
Object
- Object
- OKF::TUI::App::Prompt
- Defined in:
- lib/okf/tui/app.rb
Overview
A pending question on the status line. kind decides what the answer does;
free_text says whether it collects a line or a single confirming key.
Instance Attribute Summary collapse
-
#buffer ⇒ Object
readonly
Returns the value of attribute buffer.
-
#kind ⇒ Object
readonly
Returns the value of attribute kind.
-
#label ⇒ Object
readonly
Returns the value of attribute label.
-
#subject ⇒ Object
readonly
Returns the value of attribute subject.
Instance Method Summary collapse
- #free_text? ⇒ Boolean
-
#initialize(kind:, label:, buffer:, subject:, free_text:) ⇒ Prompt
constructor
A new instance of Prompt.
Constructor Details
#initialize(kind:, label:, buffer:, subject:, free_text:) ⇒ Prompt
Returns a new instance of Prompt.
74 75 76 77 78 79 80 |
# File 'lib/okf/tui/app.rb', line 74 def initialize(kind:, label:, buffer:, subject:, free_text:) @kind = kind @label = label @buffer = buffer @subject = subject @free_text = free_text end |
Instance Attribute Details
#buffer ⇒ Object (readonly)
Returns the value of attribute buffer.
72 73 74 |
# File 'lib/okf/tui/app.rb', line 72 def buffer @buffer end |
#kind ⇒ Object (readonly)
Returns the value of attribute kind.
72 73 74 |
# File 'lib/okf/tui/app.rb', line 72 def kind @kind end |
#label ⇒ Object (readonly)
Returns the value of attribute label.
72 73 74 |
# File 'lib/okf/tui/app.rb', line 72 def label @label end |
#subject ⇒ Object (readonly)
Returns the value of attribute subject.
72 73 74 |
# File 'lib/okf/tui/app.rb', line 72 def subject @subject end |
Instance Method Details
#free_text? ⇒ Boolean
82 83 84 |
# File 'lib/okf/tui/app.rb', line 82 def free_text? @free_text end |