Class: Mercy::ReportConfig

Inherits:
Object
  • Object
show all
Defined in:
lib/mercy/report_config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ ReportConfig

Returns a new instance of ReportConfig.



7
8
9
# File 'lib/mercy/report_config.rb', line 7

def initialize(config)
  @config = config
end

Instance Attribute Details

#configObject

Returns the value of attribute config.



3
4
5
# File 'lib/mercy/report_config.rb', line 3

def config
  @config
end

Instance Method Details

#build(parameters) ⇒ Object



11
12
13
14
# File 'lib/mercy/report_config.rb', line 11

def build(parameters)
  params = slice_parameters(parameters)
  report_class.new(config.merge(params))
end