Class: Google::Apis::PlacesV1::GoogleMapsPlacesV1RoutingSummaryLeg
- Inherits:
-
Object
- Object
- Google::Apis::PlacesV1::GoogleMapsPlacesV1RoutingSummaryLeg
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/places_v1/classes.rb,
lib/google/apis/places_v1/representations.rb,
lib/google/apis/places_v1/representations.rb
Overview
A leg is a single portion of a journey from one location to another.
Instance Attribute Summary collapse
-
#distance_meters ⇒ Fixnum
The distance of this leg of the trip.
-
#duration ⇒ String
The time it takes to complete this leg of the trip.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleMapsPlacesV1RoutingSummaryLeg
constructor
A new instance of GoogleMapsPlacesV1RoutingSummaryLeg.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleMapsPlacesV1RoutingSummaryLeg
Returns a new instance of GoogleMapsPlacesV1RoutingSummaryLeg.
2541 2542 2543 |
# File 'lib/google/apis/places_v1/classes.rb', line 2541 def initialize(**args) update!(**args) end |
Instance Attribute Details
#distance_meters ⇒ Fixnum
The distance of this leg of the trip.
Corresponds to the JSON property distanceMeters
2534 2535 2536 |
# File 'lib/google/apis/places_v1/classes.rb', line 2534 def distance_meters @distance_meters end |
#duration ⇒ String
The time it takes to complete this leg of the trip.
Corresponds to the JSON property duration
2539 2540 2541 |
# File 'lib/google/apis/places_v1/classes.rb', line 2539 def duration @duration end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2546 2547 2548 2549 |
# File 'lib/google/apis/places_v1/classes.rb', line 2546 def update!(**args) @distance_meters = args[:distance_meters] if args.key?(:distance_meters) @duration = args[:duration] if args.key?(:duration) end |