Class: OpenRosa::Fields::Repeat

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

Overview

Repeat field for repeating sections Maps to XForms element All fields within repeat can occur multiple times

Instance Attribute Summary collapse

Attributes inherited from Base

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

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of Repeat.



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

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

Instance Attribute Details

#appearanceObject (readonly)

Returns the value of attribute appearance.



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

def appearance
  @appearance
end

#countObject (readonly)

Returns the value of attribute count.



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

def count
  @count
end

#fieldsObject (readonly)

Returns the value of attribute fields.



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

def fields
  @fields
end

#relevantObject (readonly)

Returns the value of attribute relevant.



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

def relevant
  @relevant
end