Class: BackgroundJobs::Sidekiq::Attributes

Inherits:
Array
  • Object
show all
Defined in:
lib/background_jobs/strategies/sidekiq/job_attributes_adapter.rb

Instance Method Summary collapse

Constructor Details

#initialize(array) ⇒ Attributes

Returns a new instance of Attributes.



18
19
20
# File 'lib/background_jobs/strategies/sidekiq/job_attributes_adapter.rb', line 18

def initialize(array)
  super array.map {|attr| create_attribute(attr) }
end

Instance Method Details

#decodeObject



26
27
28
# File 'lib/background_jobs/strategies/sidekiq/job_attributes_adapter.rb', line 26

def decode
  map(&:decode)
end

#encodeObject



22
23
24
# File 'lib/background_jobs/strategies/sidekiq/job_attributes_adapter.rb', line 22

def encode
  map(&:encode)
end