Class: Rails::Generators::PluginGenerator

Inherits:
NamedBase
  • Object
show all
Defined in:
lib/rails/generators/rails/plugin/plugin_generator.rb

Instance Method Summary collapse

Methods inherited from NamedBase

#initialize

Methods inherited from Base

base_root, class_option, default_source_root, desc, hook_for, inherited, namespace, remove_hook_for, source_root

Methods included from Actions

#add_source, #capify!, #environment, #freeze!, #gem, #generate, #git, #initializer, #lib, #plugin, #rake, #rakefile, #readme, #route, #vendor

Constructor Details

This class inherits a constructor from Rails::Generators::NamedBase

Instance Method Details

#create_lib_filesObject



14
15
16
# File 'lib/rails/generators/rails/plugin/plugin_generator.rb', line 14

def create_lib_files
  directory 'lib', plugin_dir('lib'), :recursive => false
end

#create_root_filesObject



10
11
12
# File 'lib/rails/generators/rails/plugin/plugin_generator.rb', line 10

def create_root_files
  directory '.', plugin_dir, :recursive => false
end

#create_tasks_filesObject



18
19
20
21
# File 'lib/rails/generators/rails/plugin/plugin_generator.rb', line 18

def create_tasks_files
  return unless options[:tasks]
  directory 'lib/tasks', plugin_dir('lib/tasks')
end