Class: CacheKeeper::CachedMethodSerializer
- Inherits:
-
ActiveJob::Serializers::ObjectSerializer
- Object
- ActiveJob::Serializers::ObjectSerializer
- CacheKeeper::CachedMethodSerializer
- Defined in:
- app/serializers/cache_keeper/cached_method_serializer.rb
Instance Method Summary collapse
Instance Method Details
#deserialize(hash) ⇒ Object
14 15 16 |
# File 'app/serializers/cache_keeper/cached_method_serializer.rb', line 14 def deserialize(hash) CacheKeeper::CachedMethod.new hash["klass"], hash["method_name"], hash["options"] end |
#serialize(cached_method) ⇒ Object
6 7 8 9 10 11 12 |
# File 'app/serializers/cache_keeper/cached_method_serializer.rb', line 6 def serialize(cached_method) super( "klass" => cached_method.klass, "method_name" => cached_method.method_name, "options" => cached_method. ) end |
#serialize?(argument) ⇒ Boolean
2 3 4 |
# File 'app/serializers/cache_keeper/cached_method_serializer.rb', line 2 def serialize?(argument) argument.is_a? CacheKeeper::CachedMethod end |