Class: Mercy::ReportConfig
- Inherits:
-
Object
- Object
- Mercy::ReportConfig
- Defined in:
- lib/mercy/report_config.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
Returns the value of attribute config.
Instance Method Summary collapse
- #build(parameters) ⇒ Object
-
#initialize(config) ⇒ ReportConfig
constructor
A new instance of ReportConfig.
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
#config ⇒ Object
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 |