Class: Wizard::Choice

Inherits:
Object
  • Object
show all
Defined in:
lib/wizard/field.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id, opts) ⇒ Choice

Returns a new instance of Choice.



8
9
10
11
12
13
14
# File 'lib/wizard/field.rb', line 8

def initialize(id, opts)
  @id = id
  @data = opts[:data]
  @label = opts[:label]
  @extra_label = opts[:extra_label]
  @icon = opts[:icon]
end

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data.



5
6
7
# File 'lib/wizard/field.rb', line 5

def data
  @data
end

#extra_labelObject (readonly)

Returns the value of attribute extra_label.



5
6
7
# File 'lib/wizard/field.rb', line 5

def extra_label
  @extra_label
end

#fieldObject

Returns the value of attribute field.



6
7
8
# File 'lib/wizard/field.rb', line 6

def field
  @field
end

#iconObject (readonly)

Returns the value of attribute icon.



5
6
7
# File 'lib/wizard/field.rb', line 5

def icon
  @icon
end

#idObject (readonly)

Returns the value of attribute id.



5
6
7
# File 'lib/wizard/field.rb', line 5

def id
  @id
end

#labelObject (readonly)

Returns the value of attribute label.



5
6
7
# File 'lib/wizard/field.rb', line 5

def label
  @label
end