Class: CheckstyleOutputReader

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

Overview

Reads the checkstyle:check file

Instance Method Summary collapse

Constructor Details

#initialize(filename) ⇒ CheckstyleOutputReader

Returns a new instance of CheckstyleOutputReader.



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

def initialize(filename)
  @filename = filename
end

Instance Method Details

#readObject



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

def read
  File.read(@filename)
rescue Errno::ENOENT
  raise ArgumentError, "File not found: #{@filename}"
end