Class: BlizzardApi::ApiResponse
- Inherits:
 - 
      Object
      
        
- Object
 - BlizzardApi::ApiResponse
 
 
- Defined in:
 - lib/blizzard_api/api_response.rb
 
Overview
Simple replacement for the http response object for cached data
Instance Attribute Summary collapse
- 
  
    
      #body  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute body.
 - 
  
    
      #code  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute code.
 
Instance Method Summary collapse
- #cached? ⇒ Boolean
 - 
  
    
      #initialize(body)  ⇒ ApiResponse 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of ApiResponse.
 
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
#body ⇒ Object (readonly)
Returns the value of attribute body.
      7 8 9  | 
    
      # File 'lib/blizzard_api/api_response.rb', line 7 def body @body end  | 
  
#code ⇒ Object (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
      14 15 16  | 
    
      # File 'lib/blizzard_api/api_response.rb', line 14 def cached? true end  |