Class: BackgroundJobs::Sidekiq::Attributes
- Inherits:
-
Array
- Object
- Array
- BackgroundJobs::Sidekiq::Attributes
- Defined in:
- lib/background_jobs/strategies/sidekiq/job_attributes_adapter.rb
Instance Method Summary collapse
- #decode ⇒ Object
- #encode ⇒ Object
-
#initialize(array) ⇒ Attributes
constructor
A new instance of Attributes.
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
#decode ⇒ Object
26 27 28 |
# File 'lib/background_jobs/strategies/sidekiq/job_attributes_adapter.rb', line 26 def decode map(&:decode) end |
#encode ⇒ Object
22 23 24 |
# File 'lib/background_jobs/strategies/sidekiq/job_attributes_adapter.rb', line 22 def encode map(&:encode) end |