Class: Rails::Generators::PluginGenerator
- Inherits:
-
NamedBase
show all
- Defined in:
- railties/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, #gem, #generate, #git, #initializer, #lib, #plugin, #rake, #rakefile, #readme, #route, #vendor
Instance Method Details
#create_lib_files ⇒ Object
21
22
23
|
# File 'railties/lib/rails/generators/rails/plugin/plugin_generator.rb', line 21
def create_lib_files
directory 'lib', plugin_dir('lib'), :recursive => false
end
|
#create_root_files ⇒ Object
17
18
19
|
# File 'railties/lib/rails/generators/rails/plugin/plugin_generator.rb', line 17
def create_root_files
directory '.', plugin_dir, :recursive => false
end
|
#create_tasks_files ⇒ Object
25
26
27
28
|
# File 'railties/lib/rails/generators/rails/plugin/plugin_generator.rb', line 25
def create_tasks_files
return unless options[:tasks]
directory 'lib/tasks', plugin_dir('lib/tasks')
end
|
#show_deprecation ⇒ Object
9
10
11
12
13
|
# File 'railties/lib/rails/generators/rails/plugin/plugin_generator.rb', line 9
def show_deprecation
return unless behavior == :invoke
message = "Plugin generator is deprecated, please use 'rails plugin new' command to generate plugin structure."
ActiveSupport::Deprecation.warn message
end
|