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.
12 13 14 |
# File 'lib/moneta/transformer/helper/bson.rb', line 12 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.
8 9 10 |
# File 'lib/moneta/transformer/helper/bson.rb', line 8 def load(value) ::BSON::Document.from_bson(::BSON::ByteBuffer.new(value))['v'] end |