class Spellr::BaseReporter

Public Class Methods

new(output = nil) click to toggle source
# File lib/spellr/base_reporter.rb, line 10
def initialize(output = nil)
  @output = output
end

Public Instance Methods

call(token) click to toggle source
# File lib/spellr/base_reporter.rb, line 18
def call(token)
  puts "#{aqua token.location} #{token.line.highlight(token.char_range).strip}"
end
counts() click to toggle source
# File lib/spellr/base_reporter.rb, line 46
def counts
  output.counts
end
exit_code() click to toggle source
# File lib/spellr/base_reporter.rb, line 38
def exit_code
  output.exit_code
end
finish() click to toggle source
# File lib/spellr/base_reporter.rb, line 14
def finish
  nil
end
increment(counter) click to toggle source
# File lib/spellr/base_reporter.rb, line 22
def increment(counter)
  output.increment(counter)
end
output() click to toggle source
# File lib/spellr/base_reporter.rb, line 42
def output
  @output ||= Spellr.config.output
end
print(str) click to toggle source
puts(str) click to toggle source
# File lib/spellr/base_reporter.rb, line 26
def puts(str)
  output.puts(str)
end
warn(str) click to toggle source
# File lib/spellr/base_reporter.rb, line 34
def warn(str)
  output.warn(str)
end