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.
2788 2789 2790 |
# File 'lib/google/apis/places_v1/classes.rb', line 2788 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
2781 2782 2783 |
# File 'lib/google/apis/places_v1/classes.rb', line 2781 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
2786 2787 2788 |
# File 'lib/google/apis/places_v1/classes.rb', line 2786 def duration @duration end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2793 2794 2795 2796 |
# File 'lib/google/apis/places_v1/classes.rb', line 2793 def update!(**args) @distance_meters = args[:distance_meters] if args.key?(:distance_meters) @duration = args[:duration] if args.key?(:duration) end |