Class: OKF::TUI::App::Prompt

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

#bufferObject (readonly)

Returns the value of attribute buffer.



72
73
74
# File 'lib/okf/tui/app.rb', line 72

def buffer
  @buffer
end

#kindObject (readonly)

Returns the value of attribute kind.



72
73
74
# File 'lib/okf/tui/app.rb', line 72

def kind
  @kind
end

#labelObject (readonly)

Returns the value of attribute label.



72
73
74
# File 'lib/okf/tui/app.rb', line 72

def label
  @label
end

#subjectObject (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

Returns:

  • (Boolean)


82
83
84
# File 'lib/okf/tui/app.rb', line 82

def free_text?
  @free_text
end