Class: JDC::Interactive::JDCState
- Inherits:
-
Interactive::InputState
- Object
- Interactive::InputState
- JDC::Interactive::JDCState
- Defined in:
- lib/jdc/cli/interactive.rb
Instance Method Summary collapse
- #clear_default! ⇒ Object
- #default? ⇒ Boolean
-
#initialize(options = {}, answer = nil, position = 0) ⇒ JDCState
constructor
A new instance of JDCState.
Constructor Details
#initialize(options = {}, answer = nil, position = 0) ⇒ JDCState
Returns a new instance of JDCState.
88 89 90 91 92 93 94 |
# File 'lib/jdc/cli/interactive.rb', line 88 def initialize( = {}, answer = nil, position = 0) @options = @answer = answer || "" @default = .key? :default @position = position @done = false end |
Instance Method Details
#clear_default! ⇒ Object
96 97 98 |
# File 'lib/jdc/cli/interactive.rb', line 96 def clear_default! @default = false end |
#default? ⇒ Boolean
100 101 102 |
# File 'lib/jdc/cli/interactive.rb', line 100 def default? @default end |