class ResasKit::Response
Attributes
body[R]
headers[R]
status[R]
Public Class Methods
new(response)
click to toggle source
# File lib/resas_kit/response.rb, line 7 def initialize(response) @headers = process(response.headers) @status = process(response.status) @body = process(response.body) end
Private Instance Methods
process(raw)
click to toggle source
# File lib/resas_kit/response.rb, line 15 def process(raw) case raw when Hash then Resource.new(raw) when Array then raw.map { |hash| process(hash) } when String then Resource.new else raw end end