class LaTeXProjectTemplate::Latexmk
Constants
- COMMAND_TO_PRODUCE_FILE
Attributes
path[RW]
Public Class Methods
new()
click to toggle source
# File lib/latex_project_template/task.rb, line 41 def initialize() @path = 'latexmk' @command = {} COMMAND_TO_PRODUCE_FILE.each do |type| set(type) do |target| "#{@path} -#{type.to_s} #{target}" end end set(:clean) do |target| "#{@path} -c" end set(:distclean) do |target| "#{@path} -C" end end
Public Instance Methods
command(sym, target)
click to toggle source
# File lib/latex_project_template/task.rb, line 62 def command(sym, target) @command[sym] && @command[sym].call(target) end
execute_command(sym, target)
click to toggle source
# File lib/latex_project_template/task.rb, line 66 def execute_command(sym, target) if c = command(sym, target) sh(c) end end
set(sym, &block)
click to toggle source
# File lib/latex_project_template/task.rb, line 58 def set(sym, &block) @command[sym] = block end