Class: Bidu::House::ReportBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/bidu/house/report_builder.rb

Instance Method Summary collapse

Instance Method Details

#add_config(key, config) ⇒ Object



10
11
12
# File 'lib/bidu/house/report_builder.rb', line 10

def add_config(key, config)
  configs[key] = config
end

#build(key, parameters = {}) ⇒ Object



4
5
6
7
8
# File 'lib/bidu/house/report_builder.rb', line 4

def build(key, parameters = {})
  params = parameters.slice(:period, :threshold)
  config = configs[key].merge(params)
  Bidu::House::ErrorReport.new(config)
end