Class: DumpCleaner::Cleanup::DataSourceSteps::Base

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/dump_cleaner/cleanup/data_source_steps/base.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(step_context) ⇒ Base

Returns a new instance of Base.



15
16
17
# File 'lib/dump_cleaner/cleanup/data_source_steps/base.rb', line 15

def initialize(step_context)
  @step_context = step_context.dup
end

Instance Attribute Details

#step_contextObject (readonly)

Returns the value of attribute step_context.



13
14
15
# File 'lib/dump_cleaner/cleanup/data_source_steps/base.rb', line 13

def step_context
  @step_context
end

Instance Method Details

#raise_params_error(error) ⇒ Object

Raises:

  • (ArgumentError)


19
20
21
22
# File 'lib/dump_cleaner/cleanup/data_source_steps/base.rb', line 19

def raise_params_error(error)
  step = self.class.name.split("::").last
  raise ArgumentError, "Invalid data source step params: type=#{type}, step=#{step}: #{error}"
end