Class: CloudMade::RouteSummary
- Inherits:
-
Object
- Object
- CloudMade::RouteSummary
- Defined in:
- lib/cloudmade/routing.rb
Overview
Statistics of the route
Instance Attribute Summary collapse
-
#end_point ⇒ Object
Returns the value of attribute end_point.
-
#start_point ⇒ Object
Returns the value of attribute start_point.
-
#total_distance ⇒ Object
Returns the value of attribute total_distance.
-
#total_time ⇒ Object
Returns the value of attribute total_time.
-
#transit_points ⇒ Object
Returns the value of attribute transit_points.
Instance Method Summary collapse
-
#initialize(summary) ⇒ RouteSummary
constructor
A new instance of RouteSummary.
Constructor Details
#initialize(summary) ⇒ RouteSummary
Returns a new instance of RouteSummary.
64 65 66 67 68 69 70 |
# File 'lib/cloudmade/routing.rb', line 64 def initialize(summary) self.total_distance = Float(summary['total_distance']) self.total_time = Float(summary['total_time']) self.start_point = summary['start_point'] self.end_point = summary['end_point'] self.transit_points = summary['transit_points'] end |
Instance Attribute Details
#end_point ⇒ Object
Returns the value of attribute end_point.
61 62 63 |
# File 'lib/cloudmade/routing.rb', line 61 def end_point @end_point end |
#start_point ⇒ Object
Returns the value of attribute start_point.
60 61 62 |
# File 'lib/cloudmade/routing.rb', line 60 def start_point @start_point end |
#total_distance ⇒ Object
Returns the value of attribute total_distance.
58 59 60 |
# File 'lib/cloudmade/routing.rb', line 58 def total_distance @total_distance end |
#total_time ⇒ Object
Returns the value of attribute total_time.
59 60 61 |
# File 'lib/cloudmade/routing.rb', line 59 def total_time @total_time end |
#transit_points ⇒ Object
Returns the value of attribute transit_points.
62 63 64 |
# File 'lib/cloudmade/routing.rb', line 62 def transit_points @transit_points end |