lib/rico.rb in rico-0.1.0 vs lib/rico.rb in rico-0.2.0
- old
+ new
@@ -38,15 +38,19 @@
def self.namespace=(namespace)
@namespace = namespace
end
- def self.riak
- @riak ||= Riak::Client.new
+ def self.options
+ @options || {}
end
- def self.riak=(riak)
- @riak = riak
+ def self.options=(options)
+ @options = options
+ end
+
+ def self.riak
+ Thread.current[:riak] ||= Riak::Client.new(options)
end
end
Riak::RObject.on_conflict(&Rico::Resolver.to_proc)