class Gotta::Run::Ruby::Runtime::Template
Public Class Methods
new(variables: {})
click to toggle source
# File lib/gotta/run/ruby/runtime/template.rb, line 25 def initialize(variables: {}) variables.each do |var, value| instance_variable_set("@#{var}", value) end end
Public Instance Methods
render(file)
click to toggle source
# File lib/gotta/run/ruby/runtime/template.rb, line 31 def render(file) ERB.new(File.read(file)).result(binding) end