Class: Clerk::ApiResponse
- Inherits:
-
Object
- Object
- Clerk::ApiResponse
- Defined in:
- lib/clerk-rails.rb
Instance Method Summary collapse
- #data ⇒ Object
-
#initialize(faraday_response) ⇒ ApiResponse
constructor
A new instance of ApiResponse.
- #method_missing(m, *args, &block) ⇒ Object
Constructor Details
#initialize(faraday_response) ⇒ ApiResponse
Returns a new instance of ApiResponse.
67 68 69 |
# File 'lib/clerk-rails.rb', line 67 def initialize(faraday_response) @res = faraday_response end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(m, *args, &block) ⇒ Object
75 76 77 |
# File 'lib/clerk-rails.rb', line 75 def method_missing(m, *args, &block) @res.send(m, *args, &block) end |
Instance Method Details
#data ⇒ Object
71 72 73 |
# File 'lib/clerk-rails.rb', line 71 def data JSON.parse(@res.body, symbolize_names: true) end |