class Rworkflow::SidekiqState
Attributes
worker_class[RW]
Public Class Methods
new(worker: nil, **options)
click to toggle source
Calls superclass method
# File lib/rworkflow/sidekiq_state.rb, line 5 def initialize(worker: nil, **options) super(**options) @worker_class = worker end
unserialize(state_hash)
click to toggle source
Calls superclass method
# File lib/rworkflow/sidekiq_state.rb, line 34 def unserialize(state_hash) state = super(state_hash) state.worker_class = state_hash[:worker_class] return state end
Public Instance Methods
==(other)
click to toggle source
Calls superclass method
# File lib/rworkflow/sidekiq_state.rb, line 22 def ==(other) return super && other.worker_class == @worker_class end
clone()
click to toggle source
Calls superclass method
# File lib/rworkflow/sidekiq_state.rb, line 15 def clone cloned = super cloned.worker_class = @worker_class return cloned end
merge!(state)
click to toggle source
Calls superclass method
# File lib/rworkflow/sidekiq_state.rb, line 10 def merge!(state) super @worker_class = state.worker_class if state.respond_to?(:worker_class) end
to_h()
click to toggle source
Calls superclass method
# File lib/rworkflow/sidekiq_state.rb, line 26 def to_h h = super h[:worker_class] = @worker_class return h end