class Gorki
Public Class Methods
new(host, port)
click to toggle source
# File lib/gorki.rb, line 4 def initialize(host, port) @host = host @port = port end
Public Instance Methods
get(key)
click to toggle source
# File lib/gorki.rb, line 14 def get(key) Net::HTTP.get(URI("http://#{@host}:#{@port}/get/#{key}")) end
set(key, value)
click to toggle source
# File lib/gorki.rb, line 9 def set(key, value) #Thread.new { Net::HTTP.get(URI("http://#{@host}:#{@port}/set/#{key}/#{value}")) } Net::HTTP.get(URI("http://#{@host}:#{@port}/set/#{key}/#{value}")) true end