Class: Uber::Estimate
Instance Attribute Summary collapse
-
#errors ⇒ Object
Returns the value of attribute errors.
-
#pickup_estimate ⇒ Object
Returns the value of attribute pickup_estimate.
-
#price ⇒ Object
Returns the value of attribute price.
-
#trip ⇒ Object
Returns the value of attribute trip.
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Uber::Base
Instance Attribute Details
#errors ⇒ Object
Returns the value of attribute errors.
3 4 5 |
# File 'lib/uber/models/estimate.rb', line 3 def errors @errors end |
#pickup_estimate ⇒ Object
Returns the value of attribute pickup_estimate.
3 4 5 |
# File 'lib/uber/models/estimate.rb', line 3 def pickup_estimate @pickup_estimate end |
#price ⇒ Object
Returns the value of attribute price.
3 4 5 |
# File 'lib/uber/models/estimate.rb', line 3 def price @price end |
#trip ⇒ Object
Returns the value of attribute trip.
3 4 5 |
# File 'lib/uber/models/estimate.rb', line 3 def trip @trip end |
Instance Method Details
#humanized_estimate ⇒ Object
13 14 15 16 17 |
# File 'lib/uber/models/estimate.rb', line 13 def humanized_estimate unless pickup_estimate.nil? pickup_estimate.to_i == 1 ? "#{pickup_estimate} minute" : "#{pickup_estimate} minutes" end end |