Class: HamlI18nLint::Linter::ResultSet
- Inherits:
-
Object
- Object
- HamlI18nLint::Linter::ResultSet
- Includes:
- Enumerable
- Defined in:
- lib/haml_i18n_lint/linter.rb
Overview
The lint results
Instance Method Summary collapse
- #add_result(result) ⇒ Object
- #each {|result| ... } ⇒ Object
-
#initialize ⇒ ResultSet
constructor
A new instance of ResultSet.
-
#success? ⇒ true, false
Passed lint or not.
Constructor Details
#initialize ⇒ ResultSet
26 27 28 |
# File 'lib/haml_i18n_lint/linter.rb', line 26 def initialize @results = [] end |
Instance Method Details
#add_result(result) ⇒ Object
31 32 33 |
# File 'lib/haml_i18n_lint/linter.rb', line 31 def add_result(result) @results << result end |
#each {|result| ... } ⇒ Object
36 37 38 39 40 |
# File 'lib/haml_i18n_lint/linter.rb', line 36 def each @results.each do |r| yield r end end |
#success? ⇒ true, false
43 44 45 |
# File 'lib/haml_i18n_lint/linter.rb', line 43 def success? count.zero? end |