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

Methods inherited from Base

#invoke!

Methods inherited from Base

#destination_path, #initialize, #manifest, #source_path

Methods included from Options

included

Constructor Details

This class inherits a constructor from Rails::Generator::Base

Instance Method Details

#class_collisions(*class_names) ⇒ Object



508
509
510
# File 'lib/rails_generator/commands.rb', line 508

def class_collisions(*class_names)
  logger.class_collisions class_names.join(', ')
end

#complex_template(relative_source, relative_destination, options = {}) ⇒ Object



520
521
522
# File 'lib/rails_generator/commands.rb', line 520

def complex_template(relative_source, relative_destination, options = {})
  logger.template "#{options[:insert]} inside #{relative_destination}"
end

#dependency(generator_name, args, options = {}) ⇒ Object



504
505
506
# File 'lib/rails_generator/commands.rb', line 504

def dependency(generator_name, args, options = {})
  logger.dependency "#{generator_name}(#{args.join(', ')}, #{options.inspect})"
end

#directory(relative_path) ⇒ Object



524
525
526
# File 'lib/rails_generator/commands.rb', line 524

def directory(relative_path)
  logger.directory "#{destination_path(relative_path)}/"
end

#file(relative_source, relative_destination, options = {}) ⇒ Object



512
513
514
# File 'lib/rails_generator/commands.rb', line 512

def file(relative_source, relative_destination, options = {})
  logger.file relative_destination
end

#migration_template(relative_source, relative_destination, options = {}) ⇒ Object



532
533
534
535
# File 'lib/rails_generator/commands.rb', line 532

def migration_template(relative_source, relative_destination, options = {})
  migration_directory relative_destination
  logger.migration_template file_name
end

#readme(*args) ⇒ Object



528
529
530
# File 'lib/rails_generator/commands.rb', line 528

def readme(*args)
  logger.readme args.join(', ')
end

#route_resources(*resources) ⇒ Object



537
538
539
540
# File 'lib/rails_generator/commands.rb', line 537

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



516
517
518
# File 'lib/rails_generator/commands.rb', line 516

def template(relative_source, relative_destination, options = {})
  logger.template relative_destination
end