Class: ActivePublicResources::Drivers::DriverResponse
- Inherits:
-
Object
- Object
- ActivePublicResources::Drivers::DriverResponse
- Includes:
- ActiveModel::Serializers::JSON
- Defined in:
- lib/active_public_resources/driver_response.rb
Instance Attribute Summary collapse
-
#criteria ⇒ Object
Returns the value of attribute criteria.
-
#items ⇒ Object
Returns the value of attribute items.
-
#next_criteria ⇒ Object
Returns the value of attribute next_criteria.
-
#total_items ⇒ Object
Returns the value of attribute total_items.
Instance Method Summary collapse
- #attributes ⇒ Object
-
#initialize(args) ⇒ DriverResponse
constructor
A new instance of DriverResponse.
Constructor Details
#initialize(args) ⇒ DriverResponse
Returns a new instance of DriverResponse.
8 9 10 11 12 13 |
# File 'lib/active_public_resources/driver_response.rb', line 8 def initialize(args) args.each do |k,v| instance_variable_set("@#{k}", v) unless v.nil? end @items ||= [] end |
Instance Attribute Details
#criteria ⇒ Object
Returns the value of attribute criteria.
6 7 8 |
# File 'lib/active_public_resources/driver_response.rb', line 6 def criteria @criteria end |
#items ⇒ Object
Returns the value of attribute items.
6 7 8 |
# File 'lib/active_public_resources/driver_response.rb', line 6 def items @items end |
#next_criteria ⇒ Object
Returns the value of attribute next_criteria.
6 7 8 |
# File 'lib/active_public_resources/driver_response.rb', line 6 def next_criteria @next_criteria end |
#total_items ⇒ Object
Returns the value of attribute total_items.
6 7 8 |
# File 'lib/active_public_resources/driver_response.rb', line 6 def total_items @total_items end |
Instance Method Details
#attributes ⇒ Object
15 16 17 |
# File 'lib/active_public_resources/driver_response.rb', line 15 def attributes instance_values end |