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

Instance Method Details



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 (@tags & finding.tags).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