Sha256: 2bf4a6975f9ffd7d7c7b179b968b623202d3d4bf6dd980b2eb8411552c2262e7
Contents?: true
Size: 1.31 KB
Versions: 2
Compression:
Stored size: 1.31 KB
Contents
require_relative '../include_use_case' class IncludeWithAddedComments < IncludeUseCase def self.build use_case = self.new include_command = IncludeUseCase.construct_include_command(INCLUDER_FILE_NAME, INCLUDED_FILE_NAME, pristine = false) use_case.commands_to_execute.unshift(include_command) use_case.files_to_write.store( TEMPLATE_FILE_NAME, <<EOT ### Include with Added Comments By default (that is, without option ```--pristine```) file inclusion adds comments that: * Identify the includer file. * Identify each includee file. #### Includee File @[markdown](#{INCLUDEE_FILE_NAME}) #### Includer File @[markdown](#{INCLUDER_FILE_NAME}) #### CLI You can use the command-line interface to perform the inclusion. ##### Command ```sh markdown_helper include #{INCLUDER_FILE_NAME} #{INCLUDED_FILE_NAME} ``` #### API You can use the API to perform the inclusion. ##### Ruby Code ```ruby require 'markdown_helper' markdown_helper = MarkdownHelper.new markdown_helper.include(#{INCLUDER_FILE_NAME}, #{INCLUDED_FILE_NAME}) ``` #### File with Inclusion and Added Comments @[markdown](#{INCLUDED_FILE_NAME}) The file path for the included file is relative to the .git directory. EOT ) use_case.build end end
Version data entries
2 entries across 2 versions & 1 rubygems