Class: Geonames::BoundingBox
- Inherits:
-
Object
- Object
- Geonames::BoundingBox
- Defined in:
- lib/bounding_box.rb
Instance Attribute Summary collapse
-
#east_point ⇒ Object
Returns the value of attribute east_point.
-
#north_point ⇒ Object
Returns the value of attribute north_point.
-
#south_point ⇒ Object
Returns the value of attribute south_point.
-
#west_point ⇒ Object
Returns the value of attribute west_point.
Instance Method Summary collapse
- #contains?(point) ⇒ Boolean
-
#initialize(north = 0.0, south = 0.0, east = 0.0, west = 0.0) ⇒ BoundingBox
constructor
A new instance of BoundingBox.
Constructor Details
#initialize(north = 0.0, south = 0.0, east = 0.0, west = 0.0) ⇒ BoundingBox
Returns a new instance of BoundingBox.
6 7 8 9 10 11 |
# File 'lib/bounding_box.rb', line 6 def initialize(north=0.0, south=0.0, east=0.0, west=0.0) self.north_point = north self.south_point = south self.east_point = east self.west_point = west end |
Instance Attribute Details
#east_point ⇒ Object
Returns the value of attribute east_point.
3 4 5 |
# File 'lib/bounding_box.rb', line 3 def east_point @east_point end |
#north_point ⇒ Object
Returns the value of attribute north_point.
3 4 5 |
# File 'lib/bounding_box.rb', line 3 def north_point @north_point end |
#south_point ⇒ Object
Returns the value of attribute south_point.
3 4 5 |
# File 'lib/bounding_box.rb', line 3 def south_point @south_point end |
#west_point ⇒ Object
Returns the value of attribute west_point.
3 4 5 |
# File 'lib/bounding_box.rb', line 3 def west_point @west_point end |
Instance Method Details
#contains?(point) ⇒ Boolean
13 14 15 16 |
# File 'lib/bounding_box.rb', line 13 def contains?(point) #todo implement me return false end |