Class: BlizzardApi::ApiResponse

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

Overview

Simple replacement for the http response object for cached data

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(body) ⇒ ApiResponse

Returns a new instance of ApiResponse.



9
10
11
12
# File 'lib/blizzard_api/api_response.rb', line 9

def initialize(body)
  @code = 200
  @body = body
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



7
8
9
# File 'lib/blizzard_api/api_response.rb', line 7

def body
  @body
end

#codeObject (readonly)

Returns the value of attribute code.



7
8
9
# File 'lib/blizzard_api/api_response.rb', line 7

def code
  @code
end

Instance Method Details

#cached?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/blizzard_api/api_response.rb', line 14

def cached?
  true
end