Sha256: 71bcc033eb960a01473491a914a8a91a523691bd5734d220fbf50b497498066c

Contents?: true

Size: 502 Bytes

Versions: 3

Compression:

Stored size: 502 Bytes

Contents

# encoding: UTF-8
require 'set'
require 'mongo'
require 'plucky/extensions'

module Plucky
  autoload :CriteriaHash, 'plucky/criteria_hash'
  autoload :OptionsHash,  'plucky/options_hash'
  autoload :Query,        'plucky/query'
  autoload :Version,      'plucky/version'

  def self.to_object_id(value)
    if value.nil? || (value.respond_to?(:empty?) && value.empty?)
      nil
    elsif value.is_a?(BSON::ObjectID)
      value
    else
      BSON::ObjectID.from_string(value.to_s)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
plucky-0.1.4 lib/plucky.rb
plucky-0.1.3 lib/plucky.rb
plucky-0.1.2 lib/plucky.rb