Class: I18n::Hygiene::Reporter

Inherits:
Object
  • Object
show all
Defined in:
lib/i18n/hygiene/reporter.rb

Instance Method Summary collapse

Instance Method Details

#concat(result) ⇒ Object



6
7
8
9
10
# File 'lib/i18n/hygiene/reporter.rb', line 6

def concat(result)
  print_progress(result)

  results.push(result)
end

#passed?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/i18n/hygiene/reporter.rb', line 16

def passed?
  results.all? { |result| result.passed? }
end

#reportObject



20
21
22
23
24
25
26
# File 'lib/i18n/hygiene/reporter.rb', line 20

def report
  if passed?
    puts Rainbow("\ni18n hygiene checks passed.").green
  else
    puts Rainbow("\ni18n hygiene checks failed.").red
  end
end

#resultsObject



12
13
14
# File 'lib/i18n/hygiene/reporter.rb', line 12

def results
  @results ||= []
end