Class: AskAwesomely::Field::Dropdown
- Defined in:
- lib/ask_awesomely/field/dropdown.rb
Constant Summary
Constants inherited from Field
Instance Attribute Summary
Attributes inherited from Field
Instance Method Summary collapse
Methods inherited from Field
#ask, #description, #initialize, of_type, #ref, #required, #skip, #tags
Methods included from JsonBuilder
Constructor Details
This class inherits a constructor from AskAwesomely::Field::Field
Instance Method Details
#choice(label) ⇒ Object
4 5 6 7 |
# File 'lib/ask_awesomely/field/dropdown.rb', line 4 def choice(label) @state.choices ||= [] @state.choices << Choice.new(label: label) end |
#in_alphabetical_order ⇒ Object
9 10 11 |
# File 'lib/ask_awesomely/field/dropdown.rb', line 9 def in_alphabetical_order @state.alphabetical_order = true end |