123456789_123456789_123456789_123456789_123456789_

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

::ActiveSupport::Messages::SerializerWithFallback - Included

SERIALIZERS

Instance Attribute Summary

Instance Method Summary

Instance Attribute Details

#available?Boolean (readonly, private)

[ GitHub ]

  
# File 'activesupport/lib/active_support/messages/serializer_with_fallback.rb', line 134

def available?
  return @available if defined?(@available)
  silence_warnings { require "active_support/message_pack" }
  @available = true
rescue LoadError
  @available = false
end

Instance Method Details

#_load(dumped)

[ GitHub ]

  
# File 'activesupport/lib/active_support/messages/serializer_with_fallback.rb', line 125

def _load(dumped)
  ActiveSupport::MessagePack.load(dumped)
end

#dump(object)

[ GitHub ]

  
# File 'activesupport/lib/active_support/messages/serializer_with_fallback.rb', line 121

def dump(object)
  ActiveSupport::MessagePack.dump(object)
end

#dumped?(dumped) ⇒ Boolean

[ GitHub ]

  
# File 'activesupport/lib/active_support/messages/serializer_with_fallback.rb', line 129

def dumped?(dumped)
  available? && ActiveSupport::MessagePack.signature?(dumped)
end

#format

[ GitHub ]

  
# File 'activesupport/lib/active_support/messages/serializer_with_fallback.rb', line 117

def format
  :message_pack
end