Class: Turbot::API::FailureResponse
- Inherits:
- 
      Object
      
        - Object
- Turbot::API::FailureResponse
 
- Defined in:
- lib/turbot_api/api.rb
Instance Attribute Summary collapse
- 
  
    
      #data  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    Returns the value of attribute data. 
- 
  
    
      #message  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    Returns the value of attribute message. 
Instance Method Summary collapse
- 
  
    
      #initialize(response)  ⇒ FailureResponse 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of FailureResponse. 
Constructor Details
#initialize(response) ⇒ FailureResponse
Returns a new instance of FailureResponse.
| 141 142 143 144 145 | # File 'lib/turbot_api/api.rb', line 141 def initialize(response) data = JSON.parse(response.body, :symbolize_names => true) @error_code = data[:error_code] = data[:message] end | 
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
| 139 140 141 | # File 'lib/turbot_api/api.rb', line 139 def data @data end | 
#message ⇒ Object (readonly)
Returns the value of attribute message.
| 139 140 141 | # File 'lib/turbot_api/api.rb', line 139 def end |