Class: Rgr::PlainReporter

Inherits:
Object
  • Object
show all
Defined in:
lib/rgr/plain_reporter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(output = $stdout) ⇒ PlainReporter

Returns a new instance of PlainReporter.



5
6
7
# File 'lib/rgr/plain_reporter.rb', line 5

def initialize(output = $stdout)
  @output = output
end

Instance Attribute Details

#outputObject (readonly)

Returns the value of attribute output.



3
4
5
# File 'lib/rgr/plain_reporter.rb', line 3

def output
  @output
end

Instance Method Details

#report_file_matches(file, matches) ⇒ Object



9
10
11
12
13
# File 'lib/rgr/plain_reporter.rb', line 9

def report_file_matches(file, matches)
  matches.each do |match|
    output.puts "#{match.expression}: #{match.expression.source}"
  end
end