Class: Domain::Checkstyle
- Inherits:
-
Object
- Object
- Domain::Checkstyle
- Defined in:
- lib/plugins/pre-commit/domain/checkstyle.rb
Overview
Represents the Checkstyle
Instance Attribute Summary collapse
-
#bad_files ⇒ Object
readonly
Returns the value of attribute bad_files.
Class Method Summary collapse
-
.good ⇒ Object
Factory for Checkstyle without errors.
Instance Method Summary collapse
-
#good? ⇒ Boolean
A good checkstyle means no errors.
-
#initialize(bad_files) ⇒ Checkstyle
constructor
A new instance of Checkstyle.
Constructor Details
#initialize(bad_files) ⇒ Checkstyle
Returns a new instance of Checkstyle.
8 9 10 |
# File 'lib/plugins/pre-commit/domain/checkstyle.rb', line 8 def initialize(bad_files) @bad_files = bad_files end |
Instance Attribute Details
#bad_files ⇒ Object (readonly)
Returns the value of attribute bad_files.
6 7 8 |
# File 'lib/plugins/pre-commit/domain/checkstyle.rb', line 6 def bad_files @bad_files end |
Class Method Details
.good ⇒ Object
Factory for Checkstyle without errors
21 22 23 |
# File 'lib/plugins/pre-commit/domain/checkstyle.rb', line 21 def self.good Domain::Checkstyle.new(nil) end |
Instance Method Details
#good? ⇒ Boolean
A good checkstyle means no errors.
15 16 17 |
# File 'lib/plugins/pre-commit/domain/checkstyle.rb', line 15 def good? @bad_files.nil? || @bad_files.empty? end |