Class: OpenRosa::Fields::Group

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

Overview

Group field for logical grouping of fields Maps to XForms element Can contain nested fields and supports conditional display

Instance Attribute Summary collapse

Attributes inherited from Base

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

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of Group.



11
12
13
14
15
16
# File 'lib/open_rosa/fields/group.rb', line 11

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

Instance Attribute Details

#appearanceObject (readonly)

Returns the value of attribute appearance.



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

def appearance
  @appearance
end

#fieldsObject (readonly)

Returns the value of attribute fields.



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

def fields
  @fields
end

#relevantObject (readonly)

Returns the value of attribute relevant.



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

def relevant
  @relevant
end