Sha256: 1f50a012947271fb7bcf597323775f75021a6ef68116a1780522969067acc63b
Contents?: true
Size: 537 Bytes
Versions: 22
Compression:
Stored size: 537 Bytes
Contents
module Faalis module Generators module Concerns # This concern will add `render` method to generators which load # template partials module Render private def render(source, &block) source = File.expand_path(find_in_source_paths("#{source.to_s}.erb")) context = instance_eval('binding') content = ERB.new(::File.binread(source), nil, '-').result(binding) content = block.call(content) if block content end end end end end
Version data entries
22 entries across 22 versions & 1 rubygems