Module: MsgPackable::Bloomed
- Included in:
- Bloomed::PW
- Defined in:
- lib/bloomed/msg_packable.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
- #from_msgpack_ext(top, false_positive_probability, bloom) ⇒ Object
- #to_msgpack ⇒ Object
- #to_msgpack_ext ⇒ Object
Class Method Details
.included(base) ⇒ Object
5 6 7 |
# File 'lib/bloomed/msg_packable.rb', line 5 def self.included(base) base.extend(ClassMethods) end |
Instance Method Details
#from_msgpack_ext(top, false_positive_probability, bloom) ⇒ Object
13 14 15 16 17 |
# File 'lib/bloomed/msg_packable.rb', line 13 def from_msgpack_ext(top, false_positive_probability, bloom) @top = top @false_positive_probability = false_positive_probability @bloom = bloom end |
#to_msgpack ⇒ Object
19 20 21 |
# File 'lib/bloomed/msg_packable.rb', line 19 def to_msgpack self.class.msgpack_factory.dump self end |
#to_msgpack_ext ⇒ Object
9 10 11 |
# File 'lib/bloomed/msg_packable.rb', line 9 def to_msgpack_ext self.class.msgpack_factory.dump([@top, @false_positive_probability, @bloom]) end |