Class: CheckstyleReport::CheckstyleFile

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

Overview

Represents a file in Checkstyle format.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(file, errors) ⇒ CheckstyleFile

Initializes a new instance of CheckstyleFile.

Parameters:

  • file (String)

    The name of the file.

  • errors (Array<CheckstyleError>)

    An array of CheckstyleError objects related to this file.



87
88
89
90
# File 'lib/checkstyle_report/checkstyle_report.rb', line 87

def initialize(file, errors)
  @file = file
  @errors = errors
end

Instance Attribute Details

#errorsArray<CheckstyleError> (readonly)

Returns the array of CheckstyleError objects related to this file.

Returns:

  • (Array<CheckstyleError>)

    An array of CheckstyleError objects related to this file.



100
101
102
# File 'lib/checkstyle_report/checkstyle_report.rb', line 100

def errors
  @errors
end

#fileString (readonly)

Returns the name of the file.

Returns:

  • (String)

    The name of the file.



95
96
97
# File 'lib/checkstyle_report/checkstyle_report.rb', line 95

def file
  @file
end