Sha256: 592c7d6ca76ac62a09c6d5d53b3b374a9af48a50ce6d29a9209d5e642fe6fbf6

Contents?: true

Size: 1.42 KB

Versions: 4

Compression:

Stored size: 1.42 KB

Contents

module Loqate
  module Geocoding
    # A result from the directions API call.
    class Direction < Dry::Struct::Value
      # A zero based counter indicating the row number.
      #
      # @return [Integer]
      #
      attribute :segment_number, Types::Strict::Integer

      # A zero based counter indicating the row number.
      #
      # @return [Integer]
      #
      attribute :step_number, Types::Strict::Integer

      # The type of routing instruction.
      #
      # @return [String]
      #
      attribute :action, Types::Strict::String

      # Textual description of the routing instruction.
      #
      # @return [String]
      #
      attribute :description, Types::Strict::String

      # The name of the road to turn onto.
      #
      # @return [String]
      #
      attribute :road, Types::Strict::String

      # The time in seconds for this part of the route.
      #
      # @return [Integer]
      #
      attribute :step_time, Types::Strict::Integer

      # The distance in metres for this part of the route.
      #
      # @return [Integer]
      #
      attribute :step_distance, Types::Strict::Integer

      # The total time in seconds for the route.
      #
      # @return [Integer]
      #
      attribute :total_time, Types::Strict::Integer

      # The total distance in metres for the route.
      #
      # @return [Integer]
      #
      attribute :total_distance, Types::Strict::Integer
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
loqate-0.10.1 lib/loqate/geocoding/direction.rb
loqate-0.10.0 lib/loqate/geocoding/direction.rb
loqate-0.9.0 lib/loqate/geocoding/direction.rb
loqate-0.8.0 lib/loqate/geocoding/direction.rb