class LOL::Api::Response

Attributes

body[RW]
status[RW]

Public Class Methods

new(status, body) click to toggle source
# File lib/lol/api/response.rb, line 11
def initialize(status, body)
  @status, @body = status, json(body)
end

Private Instance Methods

json(body) click to toggle source
# File lib/lol/api/response.rb, line 17
def json(body)
  ActiveSupport::JSON.decode(body).
    deep_transform_keys(&:underscore).
    with_indifferent_access
end