Class: JRuby::Lint::Reporters::Html
- Inherits:
-
Object
- Object
- JRuby::Lint::Reporters::Html
- Defined in:
- lib/jruby/lint/reporters/html.rb
Instance Method Summary collapse
-
#initialize(project, output) ⇒ Html
constructor
A new instance of Html.
- #print_report(findings) ⇒ Object
- #report(findings) ⇒ Object
Constructor Details
#initialize(project, output) ⇒ Html
Returns a new instance of Html.
6 7 8 9 10 |
# File 'lib/jruby/lint/reporters/html.rb', line 6 def initialize(project, output) = project. @output = output @template = ERB.new(File.read(File.('../jruby-lint.html.erb', __FILE__))) end |
Instance Method Details
#print_report(findings) ⇒ Object
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/jruby/lint/reporters/html.rb', line 15 def print_report(findings) @findings = [] findings.each do |finding| @findings << finding unless ( & finding.).empty? end File.open(@output, 'w') do |file| file.write @template.result(binding) end end |
#report(findings) ⇒ Object
12 13 |
# File 'lib/jruby/lint/reporters/html.rb', line 12 def report(findings) end |