Class: Securetrading::Response
- Defined in:
- lib/securetrading/response.rb
Instance Attribute Summary collapse
-
#httparty ⇒ Object
readonly
Returns the value of attribute httparty.
Instance Method Summary collapse
- #data ⇒ Object
- #found ⇒ Object
-
#initialize(httparty) ⇒ Response
constructor
A new instance of Response.
Methods inherited from BaseModel
Constructor Details
#initialize(httparty) ⇒ Response
Returns a new instance of Response.
5 6 7 |
# File 'lib/securetrading/response.rb', line 5 def initialize(httparty) @httparty = httparty end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Securetrading::BaseModel
Instance Attribute Details
#httparty ⇒ Object (readonly)
Returns the value of attribute httparty.
3 4 5 |
# File 'lib/securetrading/response.rb', line 3 def httparty @httparty end |
Instance Method Details
#data ⇒ Object
9 10 11 |
# File 'lib/securetrading/response.rb', line 9 def data rows.map { |row| Record.new(row) } end |
#found ⇒ Object
13 14 15 |
# File 'lib/securetrading/response.rb', line 13 def found attributes_hash['found'].to_i end |