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.
95 96 97 98 |
# File 'lib/twin.rb', line 95 def initialize(name, object) @name = name @object = object end |
Instance Method Details
#to_json ⇒ Object
104 105 106 |
# File 'lib/twin.rb', line 104 def to_json @object.to_json end |
#to_xml ⇒ Object
100 101 102 |
# File 'lib/twin.rb', line 100 def to_xml @object.to_xml(:root => @name, :dasherize => false, :skip_types => true) end |