Class: Cartier::GPSLocation

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(latitude = nil, longitude = nil, decimal_notation = true, imperial = false) ⇒ GPSLocation

  • Args :

    • latitude -> Latitude in Degree Notation (i.e. 37.0428759)

    • longitude -> Longitude in Degree Notation (i.e. -79.0428759)

    • decimal_notation -> Defaulting to true for now

    • imperial -> Defaulting metric system

  • Returns :

    • a GPSLocation object

  • Raises :

  • ++ ->



16
17
18
19
20
21
# File 'lib/cartier/gps_location.rb', line 16

def initialize(latitude=nil, longitude=nil, decimal_notation=true, imperial=false)
  self.latitude = latitude
  self.longitude = longitude
  self.decimal_notation = decimal_notation
  self.imperial = imperial
end

Instance Attribute Details

#decimal_notationObject

Returns the value of attribute decimal_notation.



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

def decimal_notation
  @decimal_notation
end

#imperialObject

Returns the value of attribute imperial.



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

def imperial
  @imperial
end

#latitudeObject

Returns the value of attribute latitude.



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

def latitude
  @latitude
end

#longitudeObject

Returns the value of attribute longitude.



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

def longitude
  @longitude
end