Class: Twin::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/twin.rb

Instance Method Summary collapse

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_jsonObject



102
103
104
# File 'lib/twin.rb', line 102

def to_json
  @object.to_json
end

#to_xmlObject



98
99
100
# File 'lib/twin.rb', line 98

def to_xml
  @object.to_xml(:root => @name, :dasherize => false, :skip_types => true)
end