Class: ApiBuilder::ArrayWithName

Inherits:
Array
  • Object
show all
Defined in:
lib/api_builder/with_name.rb

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ ArrayWithName

Returns a new instance of ArrayWithName.



19
20
21
# File 'lib/api_builder/with_name.rb', line 19

def initialize(name)
  @name = name
end

Instance Method Details

#to_xml(options = {}) ⇒ Object



23
24
25
# File 'lib/api_builder/with_name.rb', line 23

def to_xml(options = {})
  super options.update(:root => name, :skip_types => true, :dasherize => false)
end