Class: Ajimi::Reporter
- Inherits:
-
Object
- Object
- Ajimi::Reporter
- Defined in:
- lib/ajimi/reporter.rb
Instance Method Summary collapse
-
#initialize(checker, report_template_path = nil) ⇒ Reporter
constructor
A new instance of Reporter.
- #report ⇒ Object
Constructor Details
#initialize(checker, report_template_path = nil) ⇒ Reporter
Returns a new instance of Reporter.
6 7 8 9 |
# File 'lib/ajimi/reporter.rb', line 6 def initialize(checker, report_template_path = nil) @checker = checker @report_template_path = report_template_path || File.('../reporter/template.erb', __FILE__) end |
Instance Method Details
#report ⇒ Object
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/ajimi/reporter.rb', line 11 def report if @checker.result puts "no diffs" true else erb = File.read(@report_template_path) puts ERB.new(erb, nil, '-').result(binding) false end end |