This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'mongo' | |
Mongo::Logger.level = Logger::FATAL | |
client = Mongo::Client.new('mongodb://127.0.0.1:27364/test') | |
#client = Mongo::Client.new('mongodb://%2Ftmp%2Fmongodb-27364.sock/test') | |
collection = client[:people] | |
collection.delete_many |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'concurrent' | |
require 'method_decorators' | |
# usage in class: | |
# include Decorators | |
module Decorators | |
# when module included (hook) | |
def self.included(base) | |
# some class-methods needed for decorators to work | |
base.extend MethodDecorators |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
v1.4 |
NewerOlder