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

#after_generate, #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



547
548
549
# File 'lib/rails_generator/commands.rb', line 547

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

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



559
560
561
# File 'lib/rails_generator/commands.rb', line 559

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

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



543
544
545
# File 'lib/rails_generator/commands.rb', line 543

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

#directory(relative_path) ⇒ Object



563
564
565
# File 'lib/rails_generator/commands.rb', line 563

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

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



551
552
553
# File 'lib/rails_generator/commands.rb', line 551

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

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



571
572
573
574
# File 'lib/rails_generator/commands.rb', line 571

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

#readme(*args) ⇒ Object



567
568
569
# File 'lib/rails_generator/commands.rb', line 567

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

#route_resources(*resources) ⇒ Object



576
577
578
579
# File 'lib/rails_generator/commands.rb', line 576

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



555
556
557
# File 'lib/rails_generator/commands.rb', line 555

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