Skip to content

Ruby example (redic)

Josh Baker edited this page Jan 2, 2017 · 6 revisions

redic project page

Install

gem install redic

Example

require 'redic'

r = Redic.new 'redis://127.0.0.1:9851'

r.call 'set', 'fleet', 'truck', 'point', '33', '-115'
# => 'OK'

r.call 'get', 'fleet', 'truck'
# => '{"type":"Point","coordinates":[-115,33]}'

Thanks to tom quas for providing this example code

Clone this wiki locally