Sha256: e91e892090d6cc7172a7bea227e67cdfec2bf9b0672ccd62422c02215a343b3f

Contents?: true

Size: 219 Bytes

Versions: 41

Compression:

Stored size: 219 Bytes

Contents

class Boolean
  def self.cast_from_string(value)
    value == '1' || value.downcase == 'true'
  end
end

class FalseClass
  def to_bson(*args)
    self
  end
end

class TrueClass
  def to_bson(*args)
    self
  end
end

Version data entries

41 entries across 41 versions & 2 rubygems

Version Path
mongo_doc-0.6.34 lib/mongo_doc/ext/boolean_class.rb
mongo_doc-0.6.33 lib/mongo_doc/ext/boolean_class.rb
mongo_doc-0.6.32 lib/mongo_doc/ext/boolean_class.rb
mongo_doc-0.6.31 lib/mongo_doc/ext/boolean_class.rb
mongo_doc-0.6.30 lib/mongo_doc/ext/boolean_class.rb
mongo_doc-0.6.29 lib/mongo_doc/ext/boolean_class.rb
mongo_doc-0.6.28 lib/mongo_doc/ext/boolean_class.rb
mongo_doc-0.6.27 lib/mongo_doc/ext/boolean_class.rb
mongo_doc-0.6.26 lib/mongo_doc/ext/boolean_class.rb
mongo_doc-0.6.25 lib/mongo_doc/ext/boolean_class.rb
mongo_doc-0.6.23 lib/mongo_doc/ext/boolean_class.rb
mongo_doc-0.6.22 lib/mongo_doc/ext/boolean_class.rb
mongo_doc-0.6.21 lib/mongo_doc/ext/boolean_class.rb
mongo_doc-0.6.20 lib/mongo_doc/ext/boolean_class.rb
mongo_doc-0.6.19 lib/mongo_doc/ext/boolean_class.rb
mongo_doc-0.6.18 lib/mongo_doc/ext/boolean_class.rb
mongo_doc-0.6.17 lib/mongo_doc/ext/boolean_class.rb
mongo_doc-0.6.16 lib/mongo_doc/ext/boolean_class.rb
mongo_doc-0.6.15 lib/mongo_doc/ext/boolean_class.rb
mongo_doc-0.6.14 lib/mongo_doc/ext/boolean_class.rb