Class: Geonames::BoundingBox

Inherits:
Object
  • Object
show all
Defined in:
lib/bounding_box.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_pointObject

Returns the value of attribute east_point.



3
4
5
# File 'lib/bounding_box.rb', line 3

def east_point
  @east_point
end

#north_pointObject

Returns the value of attribute north_point.



3
4
5
# File 'lib/bounding_box.rb', line 3

def north_point
  @north_point
end

#south_pointObject

Returns the value of attribute south_point.



3
4
5
# File 'lib/bounding_box.rb', line 3

def south_point
  @south_point
end

#west_pointObject

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

Returns:

  • (Boolean)


13
14
15
16
# File 'lib/bounding_box.rb', line 13

def contains?(point)
  #todo implement me
  return false
end