Class: Sidekiq::Superworker::DSLHash

Inherits:
Object
  • Object
show all
Defined in:
lib/sidekiq/superworker/dsl_hash.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeDSLHash

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_idObject

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

#recordsObject

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