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.
10 11 12 |
# File 'lib/plugins/pre_commit/domain/checkstyle.rb', line 10 def initialize(bad_files) @bad_files = bad_files end |
Instance Attribute Details
#bad_files ⇒ Object (readonly)
Returns the value of attribute bad_files.
8 9 10 |
# File 'lib/plugins/pre_commit/domain/checkstyle.rb', line 8 def bad_files @bad_files end |
Class Method Details
.good ⇒ Object
Factory for Checkstyle without errors
23 24 25 |
# File 'lib/plugins/pre_commit/domain/checkstyle.rb', line 23 def self.good Domain::Checkstyle.new(nil) end |
Instance Method Details
#good? ⇒ Boolean
A good checkstyle means no errors.
17 18 19 |
# File 'lib/plugins/pre_commit/domain/checkstyle.rb', line 17 def good? @bad_files.nil? || @bad_files.empty? end |