Class: CloudMade::RouteSummary

Inherits:
Object
  • Object
show all
Defined in:
lib/cloudmade/routing.rb

Overview

Statistics of the route

Instance Attribute Summary collapse

Instance Method Summary collapse

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_pointObject

Returns the value of attribute end_point.



61
62
63
# File 'lib/cloudmade/routing.rb', line 61

def end_point
  @end_point
end

#start_pointObject

Returns the value of attribute start_point.



60
61
62
# File 'lib/cloudmade/routing.rb', line 60

def start_point
  @start_point
end

#total_distanceObject

Returns the value of attribute total_distance.



58
59
60
# File 'lib/cloudmade/routing.rb', line 58

def total_distance
  @total_distance
end

#total_timeObject

Returns the value of attribute total_time.



59
60
61
# File 'lib/cloudmade/routing.rb', line 59

def total_time
  @total_time
end

#transit_pointsObject

Returns the value of attribute transit_points.



62
63
64
# File 'lib/cloudmade/routing.rb', line 62

def transit_points
  @transit_points
end