Class: Wizard::Choice
- Inherits:
-
Object
- Object
- Wizard::Choice
- Defined in:
- lib/wizard/field.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#extra_label ⇒ Object
readonly
Returns the value of attribute extra_label.
-
#field ⇒ Object
Returns the value of attribute field.
-
#icon ⇒ Object
readonly
Returns the value of attribute icon.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#label ⇒ Object
readonly
Returns the value of attribute label.
Instance Method Summary collapse
-
#initialize(id, opts) ⇒ Choice
constructor
A new instance of Choice.
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
#data ⇒ Object (readonly)
Returns the value of attribute data.
5 6 7 |
# File 'lib/wizard/field.rb', line 5 def data @data end |
#extra_label ⇒ Object (readonly)
Returns the value of attribute extra_label.
5 6 7 |
# File 'lib/wizard/field.rb', line 5 def extra_label @extra_label end |
#field ⇒ Object
Returns the value of attribute field.
6 7 8 |
# File 'lib/wizard/field.rb', line 6 def field @field end |
#icon ⇒ Object (readonly)
Returns the value of attribute icon.
5 6 7 |
# File 'lib/wizard/field.rb', line 5 def icon @icon end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
5 6 7 |
# File 'lib/wizard/field.rb', line 5 def id @id end |
#label ⇒ Object (readonly)
Returns the value of attribute label.
5 6 7 |
# File 'lib/wizard/field.rb', line 5 def label @label end |