Class: Sidekiq::Superworker::DSLHash
- Inherits:
-
Object
- Object
- Sidekiq::Superworker::DSLHash
- Defined in:
- lib/sidekiq/superworker/dsl_hash.rb
Instance Attribute Summary collapse
-
#record_id ⇒ Object
Returns the value of attribute record_id.
-
#records ⇒ Object
Returns the value of attribute records.
Instance Method Summary collapse
-
#initialize ⇒ DSLHash
constructor
A new instance of DSLHash.
- #nested_hash_to_records(nested_hash, args) ⇒ Object
- #rewrite_ids_of_nested_hash(nested_hash, record_id) ⇒ Object
Constructor Details
#initialize ⇒ DSLHash
Returns a new instance of DSLHash.
6 7 8 |
# File 'lib/sidekiq/superworker/dsl_hash.rb', line 6 def initialize reset end |
Instance Attribute Details
#record_id ⇒ Object
Returns the value of attribute record_id.
4 5 6 |
# File 'lib/sidekiq/superworker/dsl_hash.rb', line 4 def record_id @record_id end |
#records ⇒ Object
Returns the value of attribute records.
4 5 6 |
# File 'lib/sidekiq/superworker/dsl_hash.rb', line 4 def records @records end |
Instance Method Details
#nested_hash_to_records(nested_hash, args) ⇒ Object
10 11 12 13 14 |
# File 'lib/sidekiq/superworker/dsl_hash.rb', line 10 def nested_hash_to_records(nested_hash, args) reset @args = args nested_hash_to_records_recursive(nested_hash) end |
#rewrite_ids_of_nested_hash(nested_hash, record_id) ⇒ Object
16 17 18 19 20 |
# File 'lib/sidekiq/superworker/dsl_hash.rb', line 16 def rewrite_ids_of_nested_hash(nested_hash, record_id) reset @record_id = record_id rewrite_ids_of_nested_hash_recursive(nested_hash) end |