Class: Callapi::Call::Parser
- Inherits:
- 
      Object
      
        - Object
- Callapi::Call::Parser
 
- Extended by:
- Forwardable, Memoist
- Defined in:
- lib/callapi/call/response.rb
Overview
Change it to Callapi::Call::Parser::Base
Defined Under Namespace
Instance Method Summary collapse
- #data ⇒ Object
- 
  
    
      #initialize(response)  ⇒ Parser 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of Parser. 
- #status ⇒ Object
Constructor Details
#initialize(response) ⇒ Parser
Returns a new instance of Parser.
| 12 13 14 | # File 'lib/callapi/call/response.rb', line 12 def initialize(response) @response = response end | 
Instance Method Details
#data ⇒ Object
| 16 17 18 19 20 21 | # File 'lib/callapi/call/response.rb', line 16 def data raise_error unless ok? return nil if no_content? parse end | 
#status ⇒ Object
| 24 25 26 | # File 'lib/callapi/call/response.rb', line 24 def status code.to_i end |