Method: CircuitSwitch::Builder#report
- Defined in:
- lib/circuit_switch/builder.rb
#report(key: nil, if: nil, stop_report_if: nil, stop_report_if_reach_limit: nil, limit_count: nil) ⇒ Object
54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/circuit_switch/builder.rb', line 54 def report(key: nil, if: nil, stop_report_if: nil, stop_report_if_reach_limit: nil, limit_count: nil) arguments = { key: key, if: binding.local_variable_get(:if), stop_report_if: stop_report_if, stop_report_if_reach_limit: stop_report_if_reach_limit, limit_count: limit_count }.reject { |_, v| v.nil? } assign_reporter(**arguments) execute_report end |