Class: OpenRosa::Fields::Boolean

Inherits:
Base
  • Object
show all
Defined in:
lib/open_rosa/fields/boolean.rb

Overview

Boolean field for true/false values Maps to XForms select1 element with true/false options Data type: boolean (stored as "true" or "false" strings in XForms)

Instance Attribute Summary collapse

Attributes inherited from Base

#default, #hint, #label, #name, #required

Instance Method Summary collapse

Constructor Details

#initialize(name, options = {}) ⇒ Boolean

Returns a new instance of Boolean.



11
12
13
14
# File 'lib/open_rosa/fields/boolean.rb', line 11

def initialize(name, options = {})
  super
  @appearance = options[:appearance]
end

Instance Attribute Details

#appearanceObject (readonly)

Returns the value of attribute appearance.



9
10
11
# File 'lib/open_rosa/fields/boolean.rb', line 9

def appearance
  @appearance
end