Class: Merb::Generators::MerbFlatGenerator

Inherits:
AppGenerator show all
Defined in:
lib/generators/merb/merb_flat.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from AppGenerator

#gems_for_orm, #gems_for_template_engine, #gems_for_testing_framework, #initialize, #merb_gems_version

Methods inherited from NamedGenerator

#file_name, #initialize, #symbol_name, #test_class_name

Methods inherited from Generator

#go_up, #initialize, #with_modules

Methods included from ColorfulMessages

#error, #success, #warning

Constructor Details

This class inherits a constructor from Merb::Generators::AppGenerator

Class Method Details

.common_templates_dirObject



12
13
14
15
# File 'lib/generators/merb/merb_flat.rb', line 12

def self.common_templates_dir
  File.expand_path(File.join(File.dirname(__FILE__), '..',
                             'templates', 'application', 'common'))
end

.source_rootObject

Paths



8
9
10
# File 'lib/generators/merb/merb_flat.rb', line 8

def self.source_root
  File.join(super, 'application', 'merb_flat')
end

Instance Method Details

#class_nameObject



86
87
88
# File 'lib/generators/merb/merb_flat.rb', line 86

def class_name
  self.name.gsub("-", "_").camel_case
end

#common_templates_dirObject



21
22
23
# File 'lib/generators/merb/merb_flat.rb', line 21

def common_templates_dir
  self.class.common_templates_dir
end

#destination_rootObject



17
18
19
# File 'lib/generators/merb/merb_flat.rb', line 17

def destination_root
  File.join(@destination_root, base_name)
end