Sha256: 0c3cb1dce8c13bff3afa941336e4b4558eb623f28ac87d8d7b453dbf673af574
Contents?: true
Size: 684 Bytes
Versions: 5
Compression:
Stored size: 684 Bytes
Contents
require 'tap/generator/generators/resource' module Tap::Generator::Generators # :startdoc::generator a generator task and test # # Generates a new generator. class Generator < Resource def manifest(m, const_name) const = super # make the templates directory m.directory path('templates', const.path) # make a template file # (note it's easier to do this as a file since erb is # added, and would have to be escaped in a template) m.file path('templates', const.path, 'template_file.erb') do |file| file << "# A sample template file.\nkey: <%= key %>\n" end const end end end
Version data entries
5 entries across 5 versions & 1 rubygems