Class: Avm::EacWritingsBase1::Build::File

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

Instance Method Summary collapse

Instance Method Details

#runObject



12
13
14
15
16
# File 'lib/avm/eac_writings_base1/build/file.rb', line 12

def run
  infov 'Building', subpath
  target_path.parent.mkpath
  ::Avm::Executables.asciidoc.command('--out-file', target_path, source_path).system!
end

#source_pathObject



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

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

#target_pathObject



22
23
24
# File 'lib/avm/eac_writings_base1/build/file.rb', line 22

def target_path
  build.target_directory.join(subpath).basename_sub('.*') { |b| "#{b}.html" }
end