Class: Twitty::Response
- Inherits:
 - 
      Object
      
        
- Object
 - Twitty::Response
 
 
- Defined in:
 - lib/twitty/response.rb
 
Instance Attribute Summary collapse
- 
  
    
      #raw_response  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute raw_response.
 
Instance Method Summary collapse
- #body ⇒ Object
 - 
  
    
      #initialize(raw_response)  ⇒ Response 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of Response.
 - #status ⇒ Object
 
Constructor Details
#initialize(raw_response) ⇒ Response
Returns a new instance of Response.
      7 8 9  | 
    
      # File 'lib/twitty/response.rb', line 7 def initialize(raw_response) @raw_response = raw_response end  | 
  
Instance Attribute Details
#raw_response ⇒ Object (readonly)
Returns the value of attribute raw_response.
      5 6 7  | 
    
      # File 'lib/twitty/response.rb', line 5 def raw_response @raw_response end  | 
  
Instance Method Details
#body ⇒ Object
      11 12 13  | 
    
      # File 'lib/twitty/response.rb', line 11 def body JSON.parse(raw_response.body) end  | 
  
#status ⇒ Object
      15 16 17  | 
    
      # File 'lib/twitty/response.rb', line 15 def status raw_response.code end  |