Class: ApiBuilder::HashWithName

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

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ HashWithName

Returns a new instance of HashWithName.



7
8
9
# File 'lib/api_builder/with_name.rb', line 7

def initialize(name)
  @name = name
end

Instance Method Details

#to_xml(options = {}) ⇒ Object



11
12
13
# File 'lib/api_builder/with_name.rb', line 11

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