module Templatable

Public Class Methods

new(materials) click to toggle source
# File lib/templatable.rb, line 23
def initialize(materials)
  @materials = materials
end

Public Instance Methods

result() click to toggle source
# File lib/templatable.rb, line 27
def result
  placeholders = get_placeholders
  placeholders.each do |key, value|
    placeholders[key] = method("manufactured_#{value}").call
  end
  ERB.new(get_template).result(binding)
end