Method: Onoma::PropertyNature#to_xml_attrs
- Defined in:
- lib/onoma/property_nature.rb
#to_xml_attrs ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/onoma/property_nature.rb', line 25 def to_xml_attrs attrs = {} attrs[:name] = @name.to_s attrs[:type] = @type.to_s if @source attrs[:choices] = if inline_choices? @source.join(', ') else @source.to_s end end attrs[:required] = 'true' if @required attrs[:fallbacks] = @fallbacks.join(', ') if @fallbacks attrs[:default] = @default.to_s if @default attrs end |