Class: Evilution::Reporter::HTML::Section

Inherits:
Object
  • Object
show all
Defined in:
lib/evilution/reporter/html/section.rb

Constant Summary collapse

TEMPLATE_DIR =
File.expand_path("templates", __dir__)

Class Method Summary collapse

Class Method Details

.template(name) ⇒ Object



10
11
12
13
14
# File 'lib/evilution/reporter/html/section.rb', line 10

def self.template(name)
  path = File.join(TEMPLATE_DIR, "#{name}.html.erb")
  erb = ERB.new(File.read(path), trim_mode: "-")
  erb.def_method(self, "render")
end