Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tag: v0.2.0
Fetching contributors…

Cannot retrieve contributors at this time

26 lines (20 sloc) 0.513 kB
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
Jump to Line
Something went wrong with that request. Please try again.