Class: ViewComponent::ActiveJobSerializer

Inherits:
ActiveJob::Serializers::ObjectSerializer
  • Object
show all
Defined in:
lib/view_component/active_job_serializer.rb

Instance Method Summary collapse

Instance Method Details

#deserialize(hash) ⇒ Object



19
20
21
# File 'lib/view_component/active_job_serializer.rb', line 19

def deserialize(hash)
  ViewComponent::Serializable::Proxy.deserialize(hash)
end

#klassObject



7
8
9
# File 'lib/view_component/active_job_serializer.rb', line 7

def klass
  ViewComponent::Serializable::Proxy
end

#serialize(proxy) ⇒ Object



15
16
17
# File 'lib/view_component/active_job_serializer.rb', line 15

def serialize(proxy)
  super(proxy.serialize)
end

#serialize?(argument) ⇒ Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/view_component/active_job_serializer.rb', line 11

def serialize?(argument)
  argument.is_a?(ViewComponent::Serializable::Proxy)
end