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
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
-
#route_resources(*resources) ⇒ Object
-
#template(relative_source, relative_destination, options = {}) ⇒ Object
Methods inherited from Base
#invoke!
Methods inherited from Base
#destination_path, #initialize, #manifest, #source_path
Instance Method Details
#class_collisions(*class_names) ⇒ Object
507
508
509
|
# File 'lib/rails_generator/commands.rb', line 507
def class_collisions(*class_names)
logger.class_collisions class_names.join(', ')
end
|
#complex_template(relative_source, relative_destination, options = {}) ⇒ Object
519
520
521
|
# File 'lib/rails_generator/commands.rb', line 519
def complex_template(relative_source, relative_destination, options = {})
logger.template "#{options[:insert]} inside #{relative_destination}"
end
|
#dependency(generator_name, args, options = {}) ⇒ Object
503
504
505
|
# File 'lib/rails_generator/commands.rb', line 503
def dependency(generator_name, args, options = {})
logger.dependency "#{generator_name}(#{args.join(', ')}, #{options.inspect})"
end
|
#directory(relative_path) ⇒ Object
523
524
525
|
# File 'lib/rails_generator/commands.rb', line 523
def directory(relative_path)
logger.directory "#{destination_path(relative_path)}/"
end
|
#file(relative_source, relative_destination, options = {}) ⇒ Object
511
512
513
|
# File 'lib/rails_generator/commands.rb', line 511
def file(relative_source, relative_destination, options = {})
logger.file relative_destination
end
|
#migration_template(relative_source, relative_destination, options = {}) ⇒ Object
531
532
533
534
|
# File 'lib/rails_generator/commands.rb', line 531
def migration_template(relative_source, relative_destination, options = {})
migration_directory relative_destination
logger.migration_template file_name
end
|
#readme(*args) ⇒ Object
527
528
529
|
# File 'lib/rails_generator/commands.rb', line 527
def readme(*args)
logger.readme args.join(', ')
end
|
#route_resources(*resources) ⇒ Object
536
537
538
539
|
# File 'lib/rails_generator/commands.rb', line 536
def route_resources(*resources)
resource_list = resources.map { |r| r.to_sym.inspect }.join(', ')
logger.route "map.resources #{resource_list}"
end
|
#template(relative_source, relative_destination, options = {}) ⇒ Object
515
516
517
|
# File 'lib/rails_generator/commands.rb', line 515
def template(relative_source, relative_destination, options = {})
logger.template relative_destination
end
|