Class: VagrantWizard::Input

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant-wizard/inputs/input.rb

Direct Known Subclasses

Confirm, Password, Prompt, Select

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(prompt, data) ⇒ Input

Returns a new instance of Input.



7
8
9
10
11
12
# File 'lib/vagrant-wizard/inputs/input.rb', line 7

def initialize(prompt, data)
  @prompt = prompt
  @data = data
  @output = nil
  @silent = false
end

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data.



3
4
5
# File 'lib/vagrant-wizard/inputs/input.rb', line 3

def data
  @data
end

#outputObject (readonly)

Returns the value of attribute output.



4
5
6
# File 'lib/vagrant-wizard/inputs/input.rb', line 4

def output
  @output
end

#promptObject (readonly)

Returns the value of attribute prompt.



2
3
4
# File 'lib/vagrant-wizard/inputs/input.rb', line 2

def prompt
  @prompt
end

#silentObject

Returns the value of attribute silent.



5
6
7
# File 'lib/vagrant-wizard/inputs/input.rb', line 5

def silent
  @silent
end

Instance Method Details

#processInputObject



26
27
28
29
# File 'lib/vagrant-wizard/inputs/input.rb', line 26

def processInput
  puts "Warning: processInput not implemented for this input type"
  @output = nil
end