Class: Rails::Generators::NamedBase
- Defined in:
- railties/lib/rails/generators/named_base.rb
Direct Known Subclasses
ActiveRecord::Generators::Base, Css::Generators::AssetsGenerator, Css::Generators::ScaffoldGenerator, Erb::Generators::Base, AssetsGenerator, ChannelGenerator, ControllerGenerator, GeneratorGenerator, HelperGenerator, IntegrationTestGenerator, JobGenerator, MailboxGenerator, MailerGenerator, MigrationGenerator, ModelGenerator, ResourceRouteGenerator, ScaffoldControllerGenerator, SystemTestGenerator, TaskGenerator, TestUnit::Generators::Base, TestUnit::Generators::ChannelGenerator, TestUnit::Generators::MailboxGenerator
Instance Method Summary collapse
-
#initialize(args, *options) ⇒ NamedBase
constructor
:nodoc:.
Methods inherited from Base
base_root, class_option, default_source_root, desc, exit_on_failure?, hide!, hook_for, inherited, namespace, remove_hook_for, source_root
Methods included from Actions
#add_source, #environment, #gem, #gem_group, #generate, #git, #github, #initializer, #lib, #rails_command, #rake, #rakefile, #readme, #route, #vendor
Constructor Details
#initialize(args, *options) ⇒ NamedBase
:nodoc:
11 12 13 14 15 16 17 18 |
# File 'railties/lib/rails/generators/named_base.rb', line 11 def initialize(args, *) #:nodoc: @inside_template = nil # Unfreeze name in case it's given as a frozen string args[0] = args[0].dup if args[0].is_a?(String) && args[0].frozen? super assign_names!(name) parse_attributes! if respond_to?(:attributes) end |