Sha256: bc5b502824973bb69628ed7c2d44ea075b566ce029279f7b596c8e238cde8926
Contents?: true
Size: 948 Bytes
Versions: 2
Compression:
Stored size: 948 Bytes
Contents
require_relative '../include_use_case' class ReuseText < IncludeUseCase def self.build use_case = self.new use_case.write_includee_file use_case.write_includer_file use_case.write_ruby_file(pristine = true) use_case.commands_to_execute.push('ruby include.rb') File.write( TEMPLATE_FILE_NAME, <<EOT ### Reuse Text Use file inclusion to stay DRY (Don't Repeat Yourself). Maintain reusable text in a separate file, then include it wherever it's needed. #### File To Be Included @[markdown](#{INCLUDEE_FILE_NAME}) #### Includer File @[markdown](#{INCLUDER_FILE_NAME}) The treatment token ```:markdown``` specifies that the included text is to be treated as more markdown. @[:markdown](../interface.md) #### File with Inclusion Here's the output file, after inclusion. @[markdown](#{INCLUDED_FILE_NAME}) EOT ) use_case.build end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
markdown_helper-2.2.0 | markdown/use_cases/include_files/reuse_text/use_case_builder.rb |
markdown_helper-2.1.0 | markdown/use_cases/include_files/reuse_text/use_case_builder.rb |