Class: JRuby::Lint::Reporters::Html

Inherits:
Object
  • Object
show all
Defined in:
lib/jruby/lint/reporters/html.rb

Instance Method Summary collapse

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, options=OpenStruct.new)
  @tags, @output, @options = project.tags, output, options
  @template = ERB.new(File.read(File.expand_path('../jruby-lint.html.erb', __FILE__)))
end

Instance Method Details



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.tags).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