Class: Lite::Redis::Geo
- Inherits:
-
Base
- Object
- Base
- Lite::Redis::Geo
show all
- Defined in:
- lib/lite/redis/geo.rb
Instance Attribute Summary
Attributes inherited from Base
#client
Instance Method Summary
collapse
Methods inherited from Base
#initialize, method_missing, #respond_to_method?, #respond_to_missing?
Instance Method Details
#create(key, *member) ⇒ Object
7
8
9
|
# File 'lib/lite/redis/geo.rb', line 7
def create(key, *member)
client.geoadd(key.to_s, *member)
end
|
#distance(key, member1, member2, unit = "m") ⇒ Object
19
20
21
|
# File 'lib/lite/redis/geo.rb', line 19
def distance(key, member1, member2, unit = "m")
client.geodist(key.to_s, member1, member2, unit.to_s)
end
|
#hash(key, member) ⇒ Object
11
12
13
|
# File 'lib/lite/redis/geo.rb', line 11
def hash(key, member)
client.geohash(key.to_s, member)
end
|
#position(key, member) ⇒ Object
15
16
17
|
# File 'lib/lite/redis/geo.rb', line 15
def position(key, member)
client.geopos(key.to_s, member)
end
|
#radius(*args, **geoptions) ⇒ Object
23
24
25
|
# File 'lib/lite/redis/geo.rb', line 23
def radius(*args, **geoptions)
client.georadius(*args, **geoptions)
end
|
#radius_member(*args, **geoptions) ⇒ Object
27
28
29
|
# File 'lib/lite/redis/geo.rb', line 27
def radius_member(*args, **geoptions)
client.georadiusbymember(*args, **geoptions)
end
|