RubiGen::Commands::Update

Update generator’s action manifest.

Public Instance Methods

complex_template(relative_source, relative_destination, template_options = {}) click to toggle source
     # File lib/rubigen/commands.rb, line 655
655:       def complex_template(relative_source, relative_destination, template_options = {})
656: 
657:          begin
658:            dest_file = destination_path(relative_destination)
659:            source_to_update = File.readlines(dest_file).join
660:          rescue Errno::ENOENT
661:            logger.missing relative_destination
662:            return
663:          end
664: 
665:          logger.refreshing "#{template_options[:insert].gsub(/\.erb/,'')} inside #{relative_destination}"
666: 
667:          begin_mark = Regexp.quote(template_part_mark(template_options[:begin_mark], template_options[:mark_id]))
668:          end_mark = Regexp.quote(template_part_mark(template_options[:end_mark], template_options[:mark_id]))
669: 
670:          # Refreshing inner part of the template with freshly rendered part.
671:          rendered_part = render_template_part(template_options)
672:          source_to_update.gsub!(/#{begin_mark}.*?#{end_mark}/, rendered_part)
673: 
674:          File.open(dest_file, 'w') { |file| file.write(source_to_update) }
675:       end
directory(relative_path) click to toggle source
     # File lib/rubigen/commands.rb, line 677
677:       def directory(relative_path)
678:         # logger.directory "#{destination_path(relative_path)}/"
679:       end
file(relative_source, relative_destination, options = {}) click to toggle source
     # File lib/rubigen/commands.rb, line 647
647:       def file(relative_source, relative_destination, options = {})
648:         # logger.file relative_destination
649:       end
template(relative_source, relative_destination, options = {}) click to toggle source
     # File lib/rubigen/commands.rb, line 651
651:       def template(relative_source, relative_destination, options = {})
652:         # logger.template relative_destination
653:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.