Method: HyperTrace.should_break?
- Defined in:
- lib/hyper_trace/hyper_trace.rb
.should_break?(location, config, name, args, instance, result) ⇒ Boolean
297 298 299 300 301 302 303 |
# File 'lib/hyper_trace/hyper_trace.rb', line 297 def should_break?(location, config, name, args, instance, result) breaker = config["break_on_#{location}?"] breaker &&= breaker[name] || breaker[:all] return unless breaker args = [result, *args] if location == 'exit' instance.instance_exec(*args, &breaker) end |