Module: ErbLatex::GuardRunner

Defined in:
lib/erb_latex/guard_runner.rb

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.last_run_failedObject

Returns the value of attribute last_run_failed.



7
8
9
# File 'lib/erb_latex/guard_runner.rb', line 7

def last_run_failed
  @last_run_failed
end

Class Method Details

.run(files, watchers, options = { }) ⇒ Array<Array<String>, Boolean>

The ErbLatex runner handles the ErbLatex compilation, creates the output pdf file, writes the result to the console and triggers optional system notifications.

Parameters:

  • files (Array<String>)

    the spec files or directories

  • watchers (Array<Guard::Watcher>)

    the Guard watchers in the block

  • options (Hash) (defaults to: { })

    the options for the execution

Options Hash (options):

  • :layout, (String)

    the layout to apply to latex files

  • :data, (String)

    for use during the ERB processing

Returns:

  • (Array<Array<String>, Boolean>)

    the result for the compilation run



20
21
22
23
24
25
# File 'lib/erb_latex/guard_runner.rb', line 20

def run(files, watchers, options = { })
    ::Guard::UI.info('Compiling ' + files.join(', '), :reset=>true )
    changed_files, errors = compile_files(files, watchers, options)
    notify_result(changed_files, errors, options)
    return errors.empty?
end