# File lib/bundler/vendor/thor/actions/file_manipulation.rb, line 81 def template(source, *args, &block) config = args.last.is_a?(Hash) ? args.pop : {} destination = args.first || source source = File.expand_path(find_in_source_paths(source.to_s)) context = instance_eval('binding') create_file destination, nil, config do content = ERB.new(::File.binread(source), nil, '-').result(context) content = block.call(content) if block content end end