class Benchcc::Renderer
Public Class Methods
new(relative_to)
click to toggle source
# File lib/benchcc/benchmark.rb, line 11 def initialize(relative_to) @relative_to = Pathname.new(relative_to) @locals = {} end
Public Instance Methods
render(file, **locals, &block)
click to toggle source
# File lib/benchcc/benchmark.rb, line 16 def render(file, **locals, &block) @locals.merge!(locals) file = Pathname.new(file).expand_path(@relative_to) Tilt::ERBTemplate.new(file).render(self, **@locals, &block) end