Class: Merb::Generators::BaseSliceGenerator

Inherits:
NamedGenerator
  • Object
show all
Defined in:
lib/generators/base.rb

Class Method Summary collapse

Class Method Details

.common_template(name, template_source) ⇒ Object



27
28
29
30
31
32
33
# File 'lib/generators/base.rb', line 27

def self.common_template(name, template_source)
  common_base_dir = File.expand_path(File.dirname(__FILE__))
  template name do |t|
    t.source = File.join(common_base_dir, 'templates', 'common', template_source)
    t.destination = template_source
  end
end