Class: Rails::Generators::NamedBase
- Defined in:
- lib/rails/generators/named_base.rb
Direct Known Subclasses
Erb::Generators::Base, ControllerGenerator, GeneratorGenerator, HelperGenerator, IntegrationTestGenerator, MigrationGenerator, ModelGenerator, ObserverGenerator, PerformanceTestGenerator, PluginGenerator, ScaffoldControllerGenerator, SessionMigrationGenerator, TestUnit::Generators::Base
Instance Method Summary collapse
-
#initialize(args, *options) ⇒ NamedBase
constructor
:nodoc:.
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
#initialize(args, *options) ⇒ NamedBase
:nodoc:
9 10 11 12 13 14 15 |
# File 'lib/rails/generators/named_base.rb', line 9 def initialize(args, *) #:nodoc: # 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!(self.name) parse_attributes! if respond_to?(:attributes) end |