Class: HamlI18nLint::Linter::ResultSet

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/haml_i18n_lint/linter.rb

Overview

The lint results

Instance Method Summary collapse

Constructor Details

#initializeResultSet



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

Yields:

  • (result)

    Gives each result to a block.



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