Sha256: 028437f44f44a72a223d0649c65fd8ba232cb11b721487c152fd658e70f7751d

Contents?: true

Size: 484 Bytes

Versions: 2

Compression:

Stored size: 484 Bytes

Contents

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

2 entries across 2 versions & 1 rubygems

Version Path
plucky-0.1.1 lib/plucky.rb
plucky-0.1 lib/plucky.rb