class GoogleMapsAPI::Directions::Bounds

Attributes

northeast[R]
southwest[R]

Public Class Methods

from_hash(hash) click to toggle source
# File lib/google_maps_api/directions/bounds.rb, line 10
def self.from_hash(hash)
  northeast = build_coordinate(hash["northeast"])
  southwest = build_coordinate(hash["southwest"])
  self.new(northeast, southwest)
end
new(northeast, southwest) click to toggle source
# File lib/google_maps_api/directions/bounds.rb, line 4
def initialize(northeast, southwest)
  @northeast = northeast
  @southwest = southwest
  self
end

Private Class Methods

build_coordinate(hash) click to toggle source
# File lib/google_maps_api/directions/bounds.rb, line 18
def self.build_coordinate(hash)
  GoogleMapsAPI::Core::Coordinate.from_hash(hash)
end