Class: Location
Instance Attribute Summary (collapse)
-
- (Float) accuracy
Populated by the location monitoring service.
-
- (String) address
Populated after reverse geocoding a string.
-
- (Float) altitude
Populated by the location monitoring service.
-
- (String) area
Populated after reverse geocoding a string.
-
- (String) country
Populated after reverse geocoding a string.
-
- (Float) latitude
Populated by the location monitoring service.
-
- (String) localiton
Populated after reverse geocoding a string.
-
- (Object) locality
Returns the value of attribute locality.
-
- (Float) longitude
Populated by the location monitoring service.
-
- (String) name
Populated after reverse geocoding a string.
-
- (String) postal_code
Populated after reverse geocoding a string.
-
- (Float) speed
Populated by the location monitoring service.
-
- (String) sub_area
Populated after reverse geocoding a string.
-
- (Time) time
Populated by the location monitoring service.
Class Method Summary (collapse)
-
+ (Object) geocode(str, &block)
Reverse geocode a string.
-
+ (Boolean) geocode_enabled?
Checks if the geocoder service is accessible.
-
+ (Monitor) monitor(options = {}, &block)
Starts monitoring for location updates.
-
+ (Boolean) monitor_enabled?
Checks if the location service is accessible.
Instance Method Summary (collapse)
Instance Attribute Details
- (Float) accuracy
Populated by the location monitoring service
16 17 18 |
# File 'flow/location/location.rb', line 16 def accuracy @accuracy end |
- (String) address
Populated after reverse geocoding a string
16 17 18 |
# File 'flow/location/location.rb', line 16 def address @address end |
- (Float) altitude
Populated by the location monitoring service
16 17 18 |
# File 'flow/location/location.rb', line 16 def altitude @altitude end |
- (String) area
Populated after reverse geocoding a string
16 17 18 |
# File 'flow/location/location.rb', line 16 def area @area end |
- (String) country
Populated after reverse geocoding a string
16 17 18 |
# File 'flow/location/location.rb', line 16 def country @country end |
- (Float) latitude
Populated by the location monitoring service
16 17 18 |
# File 'flow/location/location.rb', line 16 def latitude @latitude end |
- (String) localiton
Populated after reverse geocoding a string
16 17 18 |
# File 'flow/location/location.rb', line 16 def localiton @localiton end |
- (Object) locality
Returns the value of attribute locality
19 20 21 |
# File 'flow/location/location.rb', line 19 def locality @locality end |
- (Float) longitude
Populated by the location monitoring service
16 17 18 |
# File 'flow/location/location.rb', line 16 def longitude @longitude end |
- (String) name
Populated after reverse geocoding a string
16 17 18 |
# File 'flow/location/location.rb', line 16 def name @name end |
- (String) postal_code
Populated after reverse geocoding a string
16 17 18 |
# File 'flow/location/location.rb', line 16 def postal_code @postal_code end |
- (Float) speed
Populated by the location monitoring service
16 17 18 |
# File 'flow/location/location.rb', line 16 def speed @speed end |
- (String) sub_area
Populated after reverse geocoding a string
16 17 18 |
# File 'flow/location/location.rb', line 16 def sub_area @sub_area end |
- (Time) time
Populated by the location monitoring service
16 17 18 |
# File 'flow/location/location.rb', line 16 def time @time end |
Class Method Details
+ (Object) geocode(str, &block)
Reverse geocode a string
64 65 66 |
# File 'flow/location/location.rb', line 64 def self.geocode(str, &block) Location::Geocoder.new(str, block) end |
+ (Boolean) geocode_enabled?
Checks if the geocoder service is accessible
51 52 53 |
# File 'flow/location/location.rb', line 51 def self.geocode_enabled? Location::Geocoder.enabled? end |
+ (Monitor) monitor(options = {}, &block)
Starts monitoring for location updates.
44 45 46 47 |
# File 'flow/location/location.rb', line 44 def self.monitor(={}, &block) [:distance_filter] ||= 0 Location::Monitor.new(, block) end |
+ (Boolean) monitor_enabled?
Checks if the location service is accessible
24 25 26 |
# File 'flow/location/location.rb', line 24 def self.monitor_enabled? Location::Monitor.enabled? end |
Instance Method Details
- (Object) geocode(&block)
68 69 70 |
# File 'flow/location/location.rb', line 68 def geocode(&block) Location::Geocoder.new(self, block) end |