Class: ResourceLayoutGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- ResourceLayoutGenerator
- Defined in:
- lib/generators/resource_layout/resource_layout_generator.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.source_root ⇒ Object
7 8 9 |
# File 'lib/generators/resource_layout/resource_layout_generator.rb', line 7 def self.source_root @source_root ||= File.join(File.dirname(__FILE__), 'templates') end |
Instance Method Details
#run_generators_or_create_resource_layout_file ⇒ Object
11 12 13 |
# File 'lib/generators/resource_layout/resource_layout_generator.rb', line 11 def run_generators_or_create_resource_layout_file resource_layout_file_exists? ? run_generators : create_resource_layout_file end |