Class: Cartier::GPSLocation
- Inherits:
-
Object
- Object
- Cartier::GPSLocation
- Defined in:
- lib/cartier/gps_location.rb
Instance Attribute Summary collapse
-
#decimal_notation ⇒ Object
Returns the value of attribute decimal_notation.
-
#imperial ⇒ Object
Returns the value of attribute imperial.
-
#latitude ⇒ Object
Returns the value of attribute latitude.
-
#longitude ⇒ Object
Returns the value of attribute longitude.
Instance Method Summary collapse
-
#initialize(latitude = nil, longitude = nil, decimal_notation = true, imperial = false) ⇒ GPSLocation
constructor
-
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 : - ++ ->.
-
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_notation ⇒ Object
Returns the value of attribute decimal_notation.
3 4 5 |
# File 'lib/cartier/gps_location.rb', line 3 def decimal_notation @decimal_notation end |
#imperial ⇒ Object
Returns the value of attribute imperial.
3 4 5 |
# File 'lib/cartier/gps_location.rb', line 3 def imperial @imperial end |
#latitude ⇒ Object
Returns the value of attribute latitude.
3 4 5 |
# File 'lib/cartier/gps_location.rb', line 3 def latitude @latitude end |
#longitude ⇒ Object
Returns the value of attribute longitude.
3 4 5 |
# File 'lib/cartier/gps_location.rb', line 3 def longitude @longitude end |