Class: Avm::EacAsciidoctorBase0::Build::File
- Defined in:
- lib/avm/eac_asciidoctor_base0/build/file.rb
Instance Method Summary collapse
Instance Method Details
#run ⇒ Object
12 13 14 15 16 |
# File 'lib/avm/eac_asciidoctor_base0/build/file.rb', line 12 def run infov 'Building', subpath ::Asciidoctor.convert_file source_path.to_path, to_file: target_path.to_path, safe: :unsafe, mkdirs: true end |
#source_path ⇒ Object
18 19 20 |
# File 'lib/avm/eac_asciidoctor_base0/build/file.rb', line 18 def source_path build.project.root.join(subpath) end |
#target_path ⇒ Object
22 23 24 |
# File 'lib/avm/eac_asciidoctor_base0/build/file.rb', line 22 def target_path build.target_directory.join(subpath).basename_sub('.*') { |b| "#{b}.html" } end |