Class: GooglePlaces::Location
- Inherits:
-
Object
- Object
- GooglePlaces::Location
- Defined in:
- lib/google_places/location.rb
Instance Method Summary collapse
- #format ⇒ Object
-
#initialize(lat, lng) ⇒ Location
constructor
A new instance of Location.
Constructor Details
#initialize(lat, lng) ⇒ Location
Returns a new instance of Location.
3 4 5 6 |
# File 'lib/google_places/location.rb', line 3 def initialize(lat, lng) @lat = ("%.8f"%lat) @lng = ("%.8f"%lng) end |
Instance Method Details
#format ⇒ Object
8 9 10 |
# File 'lib/google_places/location.rb', line 8 def format [ @lat, @lng ].join(',') end |