Class: ApiBuilder::HashWithName
- Inherits:
-
Hash
- Object
- Hash
- ApiBuilder::HashWithName
- Defined in:
- lib/api_builder/with_name.rb
Instance Method Summary collapse
-
#initialize(name) ⇒ HashWithName
constructor
A new instance of HashWithName.
- #to_xml(options = {}) ⇒ Object
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( = {}) super .update(:root => name, :skip_types => true, :dasherize => false) end |