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
-
#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
Methods included from Options
included
Instance Method Details
#class_collisions(*class_names) ⇒ Object
548
549
550
|
# File 'lib/rails_generator/commands.rb', line 548
def class_collisions(*class_names)
logger.class_collisions class_names.join(', ')
end
|
#complex_template(relative_source, relative_destination, options = {}) ⇒ Object
560
561
562
|
# File 'lib/rails_generator/commands.rb', line 560
def complex_template(relative_source, relative_destination, options = {})
logger.template "#{options[:insert]} inside #{relative_destination}"
end
|
#dependency(generator_name, args, options = {}) ⇒ Object
544
545
546
|
# File 'lib/rails_generator/commands.rb', line 544
def dependency(generator_name, args, options = {})
logger.dependency "#{generator_name}(#{args.join(', ')}, #{options.inspect})"
end
|
#directory(relative_path) ⇒ Object
564
565
566
|
# File 'lib/rails_generator/commands.rb', line 564
def directory(relative_path)
logger.directory "#{destination_path(relative_path)}/"
end
|
#file(relative_source, relative_destination, options = {}) ⇒ Object
552
553
554
|
# File 'lib/rails_generator/commands.rb', line 552
def file(relative_source, relative_destination, options = {})
logger.file relative_destination
end
|
#migration_template(relative_source, relative_destination, options = {}) ⇒ Object
572
573
574
575
|
# File 'lib/rails_generator/commands.rb', line 572
def migration_template(relative_source, relative_destination, options = {})
migration_directory relative_destination
logger.migration_template file_name
end
|
#readme(*args) ⇒ Object
568
569
570
|
# File 'lib/rails_generator/commands.rb', line 568
def readme(*args)
logger.readme args.join(', ')
end
|
#route_resources(*resources) ⇒ Object
577
578
579
580
|
# File 'lib/rails_generator/commands.rb', line 577
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
556
557
558
|
# File 'lib/rails_generator/commands.rb', line 556
def template(relative_source, relative_destination, options = {})
logger.template relative_destination
end
|