Class: VMC::Interactive::CFState

Inherits:
Interactive::InputState
  • Object
show all
Defined in:
lib/vmc/cli/interactive.rb

Instance Method Summary collapse

Constructor Details

#initialize(options = {}, answer = nil, position = 0) ⇒ CFState

Returns a new instance of CFState.



88
89
90
91
92
93
94
# File 'lib/vmc/cli/interactive.rb', line 88

def initialize(options = {}, answer = nil, position = 0)
  @options = options
  @answer = answer || ""
  @default = options.key? :default
  @position = position
  @done = false
end

Instance Method Details

#clear_default!Object



96
97
98
# File 'lib/vmc/cli/interactive.rb', line 96

def clear_default!
  @default = false
end

#default?Boolean

Returns:

  • (Boolean)


100
101
102
# File 'lib/vmc/cli/interactive.rb', line 100

def default?
  @default
end