Class: GoogleApiDirections::GoogleDirectionsRoute
- Inherits:
-
Object
- Object
- GoogleApiDirections::GoogleDirectionsRoute
- Defined in:
- lib/google_api_directions/google_directions_route.rb
Instance Attribute Summary collapse
-
#distance ⇒ Object
Returns the value of attribute distance.
-
#duration ⇒ Object
Returns the value of attribute duration.
-
#route ⇒ Object
Returns the value of attribute route.
Instance Method Summary collapse
-
#initialize(route, distance, duration) ⇒ GoogleDirectionsRoute
constructor
A new instance of GoogleDirectionsRoute.
- #to_s ⇒ Object
Constructor Details
#initialize(route, distance, duration) ⇒ GoogleDirectionsRoute
Returns a new instance of GoogleDirectionsRoute.
5 6 7 8 9 |
# File 'lib/google_api_directions/google_directions_route.rb', line 5 def initialize(route, distance, duration) @route = route @distance = distance @duration = duration end |
Instance Attribute Details
#distance ⇒ Object
Returns the value of attribute distance.
3 4 5 |
# File 'lib/google_api_directions/google_directions_route.rb', line 3 def distance @distance end |
#duration ⇒ Object
Returns the value of attribute duration.
3 4 5 |
# File 'lib/google_api_directions/google_directions_route.rb', line 3 def duration @duration end |
#route ⇒ Object
Returns the value of attribute route.
3 4 5 |
# File 'lib/google_api_directions/google_directions_route.rb', line 3 def route @route end |
Instance Method Details
#to_s ⇒ Object
11 12 13 |
# File 'lib/google_api_directions/google_directions_route.rb', line 11 def to_s @route end |