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, options = OpenStruct.new) ⇒ Html
constructor
A new instance of Html.
- #print_report(findings) ⇒ Object
- #report(findings) ⇒ Object
Constructor Details
#initialize(project, output, options = OpenStruct.new) ⇒ Html
Returns a new instance of Html.
8 9 10 11 |
# File 'lib/jruby/lint/reporters/html.rb', line 8 def initialize(project, output, =OpenStruct.new) @tags, @output, @options = project., output, @template = ERB.new(File.read(File.('../jruby-lint.html.erb', __FILE__))) end |
Instance Method Details
#print_report(findings) ⇒ Object
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/jruby/lint/reporters/html.rb', line 16 def print_report(findings) @findings = [] findings.each do |finding| @findings << finding unless (@tags & finding.).empty? end File.open(@output, 'w') do |file| file.write @template.result(binding) end end |
#report(findings) ⇒ Object
13 14 |
# File 'lib/jruby/lint/reporters/html.rb', line 13 def report(findings) end |