Sha256: 04751d058bcb737e7b125e195314dff8f8afff160e29801dc8272f1ca230de0c

Contents?: true

Size: 342 Bytes

Versions: 4

Compression:

Stored size: 342 Bytes

Contents

module Generators
  module HoboSupport
    EvalTemplate = classy_module do
      
    private
      def eval_template(template_name)
        source  = File.expand_path(find_in_source_paths(template_name))
        context = instance_eval('binding')
        ERB.new(::File.binread(source), nil, '-').result(context)
      end

    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
hobo_support-1.3.0.pre19 lib/generators/hobo_support/eval_template.rb
hobo_support-1.3.0.pre18 lib/generators/hobo_support/eval_template.rb
hobo_support-1.3.0.pre16 lib/generators/hobo_support/eval_template.rb
hobo_support-1.3.0.pre15 lib/generators/hobo_support/eval_template.rb