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.
2331 2332 2333 |
# File 'lib/google/apis/places_v1/classes.rb', line 2331 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
2324 2325 2326 |
# File 'lib/google/apis/places_v1/classes.rb', line 2324 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
2329 2330 2331 |
# File 'lib/google/apis/places_v1/classes.rb', line 2329 def duration @duration end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2336 2337 2338 2339 |
# File 'lib/google/apis/places_v1/classes.rb', line 2336 def update!(**args) @distance_meters = args[:distance_meters] if args.key?(:distance_meters) @duration = args[:duration] if args.key?(:duration) end |