Module: Moneta::Transformer::Helper::BSON Private
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
- #dump(value) ⇒ Object private
- #load(value) ⇒ Object private
Instance Method Details
#dump(value) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
11 12 13 |
# File 'lib/moneta/transformer/helper/bson.rb', line 11 def dump value ::BSON::Document['v'=>value].to_bson.to_s end |
#load(value) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
7 8 9 |
# File 'lib/moneta/transformer/helper/bson.rb', line 7 def load value ::BSON::Document.from_bson(::BSON::ByteBuffer.new(value))['v'] end |