Class: CF::Interactive::CFState

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

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of CFState.


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

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


95
96
97
# File 'lib/cf/cli/interactive.rb', line 95

def clear_default!
  @default = false
end

#default?Boolean

Returns:

  • (Boolean)

99
100
101
# File 'lib/cf/cli/interactive.rb', line 99

def default?
  @default
end