Module: ActiveSupport::Messages::SerializerWithFallback::MessagePackWithFallback
| Relationships & Source Files | |
| Extension / Inclusion / Inheritance Descendants | |
|
Included In:
| |
| Super Chains via Extension / Inclusion / Inheritance | |
|
Instance Chain:
|
|
| Defined in: | activesupport/lib/active_support/messages/serializer_with_fallback.rb |
Constant Summary
Instance Attribute Summary
- #available? ⇒ Boolean readonly private
Instance Method Summary
Instance Attribute Details
#available? ⇒ Boolean (readonly, private)
[ GitHub ]
# File 'activesupport/lib/active_support/messages/serializer_with_fallback.rb', line 133
def available? return @available if defined?(@available) ActiveSupport::Ractors.on_main(self) do next @available if defined?(@available) # Check the dependency before loading the wrapper that warns if it is missing. gem "msgpack", ">= 1.7.0" require "msgpack" require "active_support/message_pack" @available = true rescue LoadError @available = false end end
Instance Method Details
#_load(dumped)
[ GitHub ]# File 'activesupport/lib/active_support/messages/serializer_with_fallback.rb', line 124
def _load(dumped) ActiveSupport::MessagePack.load(dumped) end
#dump(object)
[ GitHub ]# File 'activesupport/lib/active_support/messages/serializer_with_fallback.rb', line 120
def dump(object) ActiveSupport::MessagePack.dump(object) end
#dumped?(dumped) ⇒ Boolean
# File 'activesupport/lib/active_support/messages/serializer_with_fallback.rb', line 128
def dumped?(dumped) available? && ActiveSupport::MessagePack.signature?(dumped) end
#format
[ GitHub ]# File 'activesupport/lib/active_support/messages/serializer_with_fallback.rb', line 116
def format : end