Sha256: dd043fcd6a9d7f159209ad8f945b810edfdf1daa171b74f1762d31db7d071edf
Contents?: true
Size: 944 Bytes
Versions: 2
Compression:
Stored size: 944 Bytes
Contents
require 'tap/generator/base' <% redirect do |target| %># :startdoc::generator <replace with manifest summary> # <replace with command line description> # <%= const.name %> Documentation class <%= const.name %> < Tap::Generator::Base config :key, 'value' # a sample config # The generator will receive the inputs on the command line, and # m, a Manifest object that records the actions of this method. def manifest(m, *inputs) # make a directory # m.directory path # make a file # m.file path do |file| # file << content # end # template a file in the templates directory using ERB. # The last argument defines a hash of local variables # for use in the template (here config is used). m.template "<%= const.const_name.underscore %>_file.txt", "template_file.erb", config.to_hash end end <% module_nest(const.nesting, ' ') { target } end %>
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
tap-gen-0.1.2 | templates/tap/generator/generators/generator/task.erb |
tap-gen-0.1.3 | templates/tap/generator/generators/generator/task.erb |