module Operation::Worker::FileMarshaller

Overrides ::serializable and deserializable and handles file properties from the Contract schema.

Public Class Methods

included(base) click to toggle source

NOTE: this is WIP and the implementation will be more understandable and performant soon.

# File lib/trailblazer/operation/worker.rb, line 74
def self.included(base)
  base.extend ClassMethods
end

Private Instance Methods

deserializable(hash) click to toggle source

todo: do with_indifferent_access in deserialize and call super here.

# File lib/trailblazer/operation/worker.rb, line 106
def deserializable(hash)
  # self.class.file_marshaller_representer.new({}).extend(Representable::Debug).from_hash(hash)
  self.class.file_marshaller_representer.new({}.with_indifferent_access).from_hash(hash)
end