class Lintress::Runner
Attributes
offenses[R]
Public Class Methods
new()
click to toggle source
# File lib/lintress/runner.rb, line 10 def initialize @rubocop = RuboCop::CLI.new end
Public Instance Methods
run()
click to toggle source
# File lib/lintress/runner.rb, line 14 def run nsout = StringIO.new osout = $stdout # store the old STDOUT construct $stdout = nsout @rubocop.run @offenses = $stdout.string # return to old STDOUT $stdout = osout # puts @offenses end