class Rakuten::Response

Public Class Methods

new(response) click to toggle source
# File lib/rakuten/api/response.rb, line 5
def initialize(response)
  @response =response
  @body = JSON.parse(@response.body)
end

Public Instance Methods

code() click to toggle source
# File lib/rakuten/api/response.rb, line 10
def code
  @response.code.to_i
end
message() click to toggle source
# File lib/rakuten/api/response.rb, line 14
def message
  @response.message
end
method_missing(name, *args, &block) click to toggle source
Calls superclass method
# File lib/rakuten/api/response.rb, line 18
def method_missing(name, *args, &block)
  if @body.respond_to?(name)
    @body.send(name, *args, &block)
  else
    super
  end
end