Class: Mercy::StatusBuilder

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

Instance Method Summary collapse

Instance Method Details

#add_report_config(key, config) ⇒ Object



7
8
9
10
11
# File 'lib/mercy/status_builder.rb', line 7

def add_report_config(key, config)
  status_key = config.delete(:on) || :default
  report_builder.add_config(key, config)
  config_for(status_key) << key
end

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



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

def build(key, parameters = {})
  Mercy::Status.new(reports_for(key, parameters))
end