lib/cloudally/request.rb in cloudally-0.1.3 vs lib/cloudally/request.rb in cloudally-0.2.0
- old
+ new
@@ -6,10 +6,11 @@
module Request
class Entity
attr_reader :attributes
def initialize attributes
+ @_raw = attributes
@attributes = attributes.clone.transform_keys(&:to_s)
end
def method_missing(method_sym, *arguments, &block)
len = arguments.length
@@ -42,9 +43,13 @@
if @attributes.include? method_sym.to_s
true
else
super
end
+ end
+
+ def to_json options={}
+ @_raw.to_json
end
end
# Perform an HTTP GET request and return entity
def get(path, options = {})