Sha256: 7510bdc5b831d4c092b079660a439c0013fb2009a20b6de093bacb70650d5955
Contents?: true
Size: 911 Bytes
Versions: 7
Compression:
Stored size: 911 Bytes
Contents
<% redirect do |target| %># <%= const.name %>::generator <replace with manifest summary> # <replace with command line description> # <%= const.const_name %> Documentation class <%= const.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 << contents # end # template a file in the templates directory using ERB. # The (key, value) pairs will be available in the # template as local variables. m.template "<%= const.const_name.underscore %>_file.txt", "template_file.erb", :key => 'value' end end <% module_nest(const.nesting, ' ') { target } end %>
Version data entries
7 entries across 7 versions & 2 rubygems