class Bauk::Gen::Contents::BaseContent
Public Class Methods
new(opts)
click to toggle source
# File lib/bauk/gen/contents/base_content.rb, line 11 def initialize(opts) @attributes = opts[:attributes] @config = opts[:config] end
Public Instance Methods
content()
click to toggle source
# File lib/bauk/gen/contents/base_content.rb, line 16 def content renderer = ERB.new(File.read(@file)) begin renderer.result(OpenStruct.new(@config).instance_eval { binding }) rescue => e log.error("ERROR IN FILE: #{@file}") throw e end end