Class: RubiGen::Commands::List
Overview
List a generator’s action manifest.
Instance Attribute Summary
Attributes inherited from Base
#args, #destination_root, #source_root, #stdout
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!, #write_manifest
Methods inherited from Base
#after_generate, #base_name, #destination_path, #initialize, #manifest, #source_path
Methods included from Options
included
Constructor Details
This class inherits a constructor from RubiGen::Base
Instance Method Details
#class_collisions(*class_names) ⇒ Object
610
611
612
|
# File 'lib/rubigen/commands.rb', line 610
def class_collisions(*class_names)
logger.class_collisions class_names.join(', ')
end
|
#complex_template(relative_source, relative_destination, options = {}) ⇒ Object
622
623
624
|
# File 'lib/rubigen/commands.rb', line 622
def complex_template(relative_source, relative_destination, options = {})
logger.template "#{options[:insert]} inside #{relative_destination}"
end
|
#dependency(generator_name, args, options = {}) ⇒ Object
606
607
608
|
# File 'lib/rubigen/commands.rb', line 606
def dependency(generator_name, args, options = {})
logger.dependency "#{generator_name}(#{args.join(', ')}, #{options.inspect})"
end
|
#directory(relative_path) ⇒ Object
626
627
628
|
# File 'lib/rubigen/commands.rb', line 626
def directory(relative_path)
logger.directory "#{destination_path(relative_path)}/"
end
|
#file(relative_source, relative_destination, options = {}) ⇒ Object
614
615
616
|
# File 'lib/rubigen/commands.rb', line 614
def file(relative_source, relative_destination, options = {})
logger.file relative_destination
end
|
#migration_template(relative_source, relative_destination, options = {}) ⇒ Object
634
635
636
637
|
# File 'lib/rubigen/commands.rb', line 634
def migration_template(relative_source, relative_destination, options = {})
migration_directory relative_destination
logger.migration_template file_name
end
|
#readme(*args) ⇒ Object
630
631
632
|
# File 'lib/rubigen/commands.rb', line 630
def readme(*args)
logger.readme args.join(', ')
end
|
#route_resources(*resources) ⇒ Object
639
640
641
642
|
# File 'lib/rubigen/commands.rb', line 639
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
618
619
620
|
# File 'lib/rubigen/commands.rb', line 618
def template(relative_source, relative_destination, options = {})
logger.template relative_destination
end
|