Class: Uber::Request
Instance Attribute Summary collapse
-
#destination ⇒ Object
Returns the value of attribute destination.
-
#driver ⇒ Object
Returns the value of attribute driver.
-
#errors ⇒ Object
Returns the value of attribute errors.
-
#eta ⇒ Object
Returns the value of attribute eta.
-
#location ⇒ Object
Returns the value of attribute location.
-
#meta ⇒ Object
Returns the value of attribute meta.
-
#pickup ⇒ Object
Returns the value of attribute pickup.
-
#request_id ⇒ Object
Returns the value of attribute request_id.
-
#status ⇒ Object
Returns the value of attribute status.
-
#surge_multiplier ⇒ Object
Returns the value of attribute surge_multiplier.
-
#vehicle ⇒ Object
Returns the value of attribute vehicle.
Attributes inherited from Base
Instance Method Summary collapse
- #driver_image_url ⇒ Object
- #humanized_eta ⇒ Object
- #vehicle_image_url ⇒ Object
- #vehicle_name ⇒ Object
Methods inherited from Base
Constructor Details
This class inherits a constructor from Uber::Base
Instance Attribute Details
#destination ⇒ Object
Returns the value of attribute destination.
3 4 5 |
# File 'lib/uber/models/request.rb', line 3 def destination @destination end |
#driver ⇒ Object
Returns the value of attribute driver.
3 4 5 |
# File 'lib/uber/models/request.rb', line 3 def driver @driver end |
#errors ⇒ Object
Returns the value of attribute errors.
3 4 5 |
# File 'lib/uber/models/request.rb', line 3 def errors @errors end |
#eta ⇒ Object
Returns the value of attribute eta.
3 4 5 |
# File 'lib/uber/models/request.rb', line 3 def eta @eta end |
#location ⇒ Object
Returns the value of attribute location.
3 4 5 |
# File 'lib/uber/models/request.rb', line 3 def location @location end |
#meta ⇒ Object
Returns the value of attribute meta.
3 4 5 |
# File 'lib/uber/models/request.rb', line 3 def @meta end |
#pickup ⇒ Object
Returns the value of attribute pickup.
3 4 5 |
# File 'lib/uber/models/request.rb', line 3 def pickup @pickup end |
#request_id ⇒ Object
Returns the value of attribute request_id.
3 4 5 |
# File 'lib/uber/models/request.rb', line 3 def request_id @request_id end |
#status ⇒ Object
Returns the value of attribute status.
3 4 5 |
# File 'lib/uber/models/request.rb', line 3 def status @status end |
#surge_multiplier ⇒ Object
Returns the value of attribute surge_multiplier.
3 4 5 |
# File 'lib/uber/models/request.rb', line 3 def surge_multiplier @surge_multiplier end |
#vehicle ⇒ Object
Returns the value of attribute vehicle.
3 4 5 |
# File 'lib/uber/models/request.rb', line 3 def vehicle @vehicle end |
Instance Method Details
#driver_image_url ⇒ Object
38 39 40 |
# File 'lib/uber/models/request.rb', line 38 def driver_image_url driver.nil? ? nil : "#{driver.picture_url}" end |
#humanized_eta ⇒ Object
42 43 44 45 46 |
# File 'lib/uber/models/request.rb', line 42 def humanized_eta unless eta.nil? eta.to_i == 1 ? "#{eta} minute" : "#{eta} minutes" end end |
#vehicle_image_url ⇒ Object
34 35 36 |
# File 'lib/uber/models/request.rb', line 34 def vehicle_image_url vehicle.nil? ? nil : "#{vehicle.picture_url}" end |
#vehicle_name ⇒ Object
30 31 32 |
# File 'lib/uber/models/request.rb', line 30 def vehicle_name vehicle.nil? ? nil : "#{vehicle.make} #{vehicle.model}" end |