Class: Geogle::Model::Route
- Inherits:
-
Object
- Object
- Geogle::Model::Route
- Defined in:
- lib/geogle/model/route.rb
Instance Method Summary collapse
Instance Method Details
#destination ⇒ Object
33 34 35 |
# File 'lib/geogle/model/route.rb', line 33 def destination legs.last.end_address end |
#distance ⇒ Object
25 26 27 |
# File 'lib/geogle/model/route.rb', line 25 def distance sum_values(legs.map(&:distance)) end |
#duration ⇒ Object
21 22 23 |
# File 'lib/geogle/model/route.rb', line 21 def duration sum_values(legs.map(&:duration)) end |
#origin ⇒ Object
29 30 31 |
# File 'lib/geogle/model/route.rb', line 29 def origin legs.first.start_address end |