Class: Avm::EacAsciidoctorBase0::Build::File

Inherits:
Object
  • Object
show all
Defined in:
lib/avm/eac_asciidoctor_base0/build/file.rb

Instance Method Summary collapse

Instance Method Details

#runObject



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_pathObject



18
19
20
# File 'lib/avm/eac_asciidoctor_base0/build/file.rb', line 18

def source_path
  build.project.root.join(subpath)
end

#target_pathObject



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