Class: Twin::Response
- Inherits:
-
Object
- Object
- Twin::Response
- Defined in:
- lib/twin.rb
Instance Method Summary collapse
-
#initialize(name, object) ⇒ Response
constructor
A new instance of Response.
- #to_json ⇒ Object
- #to_xml ⇒ Object
Constructor Details
#initialize(name, object) ⇒ Response
Returns a new instance of Response.
93 94 95 96 |
# File 'lib/twin.rb', line 93 def initialize(name, object) @name = name @object = object end |
Instance Method Details
#to_json ⇒ Object
102 103 104 |
# File 'lib/twin.rb', line 102 def to_json @object.to_json end |
#to_xml ⇒ Object
98 99 100 |
# File 'lib/twin.rb', line 98 def to_xml @object.to_xml(:root => @name, :dasherize => false, :skip_types => true) end |