module Yuslow
Public Instance Methods
investigate(debug: false, output: nil, max_depth: nil) { || ... }
click to toggle source
# File lib/yuslow.rb, line 8 def investigate(debug: false, output: nil, max_depth: nil) raise 'Block expected' unless block_given? investigation = Investigation.new debug: debug, printer: printer_from(output), max_depth: max_depth investigation.start result = yield investigation.finish investigation result end
investigation(debug: false, output: nil, max_depth: nil)
click to toggle source
# File lib/yuslow.rb, line 19 def investigation(debug: false, output: nil, max_depth: nil) Investigation.new debug: debug, printer: printer_from(output), max_depth: max_depth end
Private Instance Methods
printer_from(param)
click to toggle source
# File lib/yuslow.rb, line 25 def printer_from(param) case param when false then nil when :stdout then StdoutPrinter else StdoutPrinter end end