Class: Shapes::Point

Inherits:
GeoObject show all
Defined in:
lib/shapes/geometry.rb

Instance Attribute Summary collapse

Attributes inherited from GeoObject

#attributes

Instance Method Summary collapse

Constructor Details

#initialize(lat = nil, long = nil, alt = nil, attributes = {}) ⇒ Point

Returns a new instance of Point.



13
14
15
16
17
18
19
# File 'lib/shapes/geometry.rb', line 13

def initialize(lat = nil,long = nil,alt = nil,attributes = {})
  super
  self.latitude   = lat
  self.longitude  = long
  self.altitude = alt
  self.attributes = attributes
end

Instance Attribute Details

#altitudeObject

Returns the value of attribute altitude.



11
12
13
# File 'lib/shapes/geometry.rb', line 11

def altitude
  @altitude
end

#latitudeObject

Returns the value of attribute latitude.



11
12
13
# File 'lib/shapes/geometry.rb', line 11

def latitude
  @latitude
end

#longitudeObject

Returns the value of attribute longitude.



11
12
13
# File 'lib/shapes/geometry.rb', line 11

def longitude
  @longitude
end