class Chive::Generators::ControllersGenerator
Public Instance Methods
manifest()
click to toggle source
This option is not necessary while there is only one controller class_option :only, type: :array, enum: ModuleFunctions.controller_names
, default: [], desc: 'Select controllers (default is all)'
# File lib/generators/chive/controllers_generator.rb, line 30 def manifest puts 'running' controller_names.each do |name| # This option is not necessary while there is only one controller # next unless options[:only].empty? || file.start_with?(options[:only]) copy_file "chive/#{name}_controller.rb", "app/controllers/chive/#{name}_controller.rb" end end
Private Instance Methods
source_paths()
click to toggle source
# File lib/generators/chive/controllers_generator.rb, line 41 def source_paths [controller_path] end