Class: Rails::Generator::Commands::List
- Inherits:
-
Base
show all
- Defined in:
- lib/rails_generator/commands.rb
Overview
List a generator’s action manifest.
Instance Attribute Summary
Attributes inherited from Base
#args, #destination_root, #source_root
Attributes included from Options
#options
Instance Method Summary
collapse
-
#class_collisions(*class_names) ⇒ Object
-
#complex_template(relative_source, relative_destination, options = {}) ⇒ Object
-
#dependency(generator_name, args, options = {}) ⇒ Object
-
#directory(relative_path) ⇒ Object
-
#file(relative_source, relative_destination, options = {}) ⇒ Object
-
#migration_template(relative_source, relative_destination, options = {}) ⇒ Object
-
#readme(*args) ⇒ Object
-
#template(relative_source, relative_destination, options = {}) ⇒ Object
Methods inherited from Base
#invoke!
Methods inherited from Base
#destination_path, #initialize, #manifest, #source_path
Methods included from Options
append_features
Instance Method Details
#class_collisions(*class_names) ⇒ Object
450
451
452
|
# File 'lib/rails_generator/commands.rb', line 450
def class_collisions(*class_names)
logger.class_collisions class_names.join(', ')
end
|
#complex_template(relative_source, relative_destination, options = {}) ⇒ Object
462
463
464
|
# File 'lib/rails_generator/commands.rb', line 462
def complex_template(relative_source, relative_destination, options = {})
logger.template "#{options[:insert]} inside #{relative_destination}"
end
|
#dependency(generator_name, args, options = {}) ⇒ Object
446
447
448
|
# File 'lib/rails_generator/commands.rb', line 446
def dependency(generator_name, args, options = {})
logger.dependency "#{generator_name}(#{args.join(', ')}, #{options.inspect})"
end
|
#directory(relative_path) ⇒ Object
466
467
468
|
# File 'lib/rails_generator/commands.rb', line 466
def directory(relative_path)
logger.directory "#{destination_path(relative_path)}/"
end
|
#file(relative_source, relative_destination, options = {}) ⇒ Object
454
455
456
|
# File 'lib/rails_generator/commands.rb', line 454
def file(relative_source, relative_destination, options = {})
logger.file relative_destination
end
|
#migration_template(relative_source, relative_destination, options = {}) ⇒ Object
474
475
476
477
|
# File 'lib/rails_generator/commands.rb', line 474
def migration_template(relative_source, relative_destination, options = {})
migration_directory relative_destination
logger.migration_template file_name
end
|
#readme(*args) ⇒ Object
470
471
472
|
# File 'lib/rails_generator/commands.rb', line 470
def readme(*args)
logger.readme args.join(', ')
end
|
#template(relative_source, relative_destination, options = {}) ⇒ Object
458
459
460
|
# File 'lib/rails_generator/commands.rb', line 458
def template(relative_source, relative_destination, options = {})
logger.template relative_destination
end
|