Class: Tap::Generator::Generators::Resource
- Defined in:
- lib/tap/generator/generators/resource.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Base
Attributes included from Helpers
Instance Method Summary collapse
Methods inherited from Base
#action, build, convert_to_spec, #directories, #directory, #file, #initialize, #iterate, #log_relative, #on, parse_as, #path, #process, #template, #template_files
Methods included from Helpers
Constructor Details
This class inherits a constructor from Tap::Generator::Base
Instance Method Details
#manifest(m, const_name) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/tap/generator/generators/resource.rb', line 9 def manifest(m, const_name) const = ::Tap::Env::Constant.new(const_name.camelize) task_path = path('lib', "#{const.relative_path}.rb") m.directory File.dirname(task_path) m.template task_path, "resource.erb", :const => const if test test_path = path('test', "#{const.relative_path}_test.rb") m.directory File.dirname(test_path) m.template test_path, "test.erb", :const => const end const end |