Sha256: 1f27af51c42fcee5769b20e9ad2694a0a4fd4e605f9c3764599fe4939f839bb1
Contents?: true
Size: 513 Bytes
Versions: 2
Compression:
Stored size: 513 Bytes
Contents
require 'set' require 'forwardable' require 'mongo' require 'flipper/adapters/mongo/document' module Flipper module Adapters class MongoSingleDocument extend Forwardable def initialize(collection, options = {}) @collection = collection @options = options end def_delegators :document, :read, :write, :delete, :set_members, :set_add, :set_delete private def document Document.new(@collection, :id => @options[:id]) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
flipper-mongo-0.2.1 | lib/flipper/adapters/mongo_single_document.rb |
flipper-mongo-0.2.0 | lib/flipper/adapters/mongo_single_document.rb |