class Object
Public Instance Methods
Hotch(name: $PROGRAM_NAME, aggregate: true, viewer: ENV.fetch("HOTCH_VIEWER", nil), mode: :wall, filter: ENV.fetch("HOTCH_FILTER", nil), options: {}, &block)
click to toggle source
rubocop:disable Naming/MethodName
# File lib/hotch.rb, line 113 def Hotch(name: $PROGRAM_NAME, aggregate: true, viewer: ENV.fetch("HOTCH_VIEWER", nil), mode: :wall, filter: ENV.fetch("HOTCH_FILTER", nil), options: {}, &block) hotch = if aggregate $hotch ||= Hotch.new(name, viewer: viewer, mode: mode, filter: filter, options: options) else caller = Kernel.caller_locations(1).first name = "#{name}:#{caller.path}:#{caller.lineno}" Hotch.new(name, viewer: viewer, filter: filter, options: options) end hotch.report_at_exit hotch.run(&block) end