Class: XLFormRowDescriptor

Inherits:
Object
  • Object
show all
Defined in:
lib/ProMotion/XLForm/xl_form_patch.rb

Instance Method Summary collapse

Instance Method Details

#options=(options) ⇒ Object



20
21
22
# File 'lib/ProMotion/XLForm/xl_form_patch.rb', line 20

def options=(options)
  self.selectorOptions = parse_options(options)
end

#parse_options(options) ⇒ Object



24
25
26
27
28
29
30
31
32
33
34
# File 'lib/ProMotion/XLForm/xl_form_patch.rb', line 24

def parse_options(options)
  return nil if options.nil? or options.empty?

  options.map do |key, text|
    val = key
    if val.is_a? Symbol
      val = val.to_s
    end
    XLFormOptionsObject.formOptionsObjectWithValue(val, displayText: text)
  end
end