Class: GoogleMapsAPI::Directions::Bounds
- Inherits:
-
Object
- Object
- GoogleMapsAPI::Directions::Bounds
- Defined in:
- lib/google_maps_api/directions/bounds.rb
Instance Attribute Summary collapse
-
#northeast ⇒ Object
readonly
Returns the value of attribute northeast.
-
#southwest ⇒ Object
readonly
Returns the value of attribute southwest.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(northeast, southwest) ⇒ Bounds
constructor
A new instance of Bounds.
Constructor Details
#initialize(northeast, southwest) ⇒ Bounds
Returns a new instance of Bounds.
4 5 6 7 8 |
# File 'lib/google_maps_api/directions/bounds.rb', line 4 def initialize(northeast, southwest) @northeast = northeast @southwest = southwest self end |
Instance Attribute Details
#northeast ⇒ Object (readonly)
Returns the value of attribute northeast.
2 3 4 |
# File 'lib/google_maps_api/directions/bounds.rb', line 2 def northeast @northeast end |
#southwest ⇒ Object (readonly)
Returns the value of attribute southwest.
2 3 4 |
# File 'lib/google_maps_api/directions/bounds.rb', line 2 def southwest @southwest end |
Class Method Details
.from_hash(hash) ⇒ Object
10 11 12 13 14 |
# 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 |