Class: OpenRosa::Fields::Select1
- Defined in:
- lib/open_rosa/fields/select1.rb
Overview
Single select field (radio buttons or dropdown)
Maps to XForms
Instance Attribute Summary collapse
-
#appearance ⇒ Object
readonly
Returns the value of attribute appearance.
-
#choices ⇒ Object
readonly
Returns the value of attribute choices.
Attributes inherited from Base
#default, #hint, #label, #name, #required
Instance Method Summary collapse
-
#initialize(name, options = {}) ⇒ Select1
constructor
A new instance of Select1.
Constructor Details
#initialize(name, options = {}) ⇒ Select1
Returns a new instance of Select1.
10 11 12 13 14 15 16 |
# File 'lib/open_rosa/fields/select1.rb', line 10 def initialize(name, = {}) super @choices = [:choices] @appearance = [:appearance] validate! end |
Instance Attribute Details
#appearance ⇒ Object (readonly)
Returns the value of attribute appearance.
8 9 10 |
# File 'lib/open_rosa/fields/select1.rb', line 8 def appearance @appearance end |
#choices ⇒ Object (readonly)
Returns the value of attribute choices.
8 9 10 |
# File 'lib/open_rosa/fields/select1.rb', line 8 def choices @choices end |