Class: Texas::Build::Task::OpenPDF

Inherits:
Script show all
Defined in:
lib/texas/build/task/open_pdf.rb

Overview

This build task opens the generated PDF file.

Constant Summary collapse

DEFAULT_OPEN_CMD =
'evince "<%= build.dest_file %>"'

Instance Attribute Summary

Attributes inherited from Base

#build

Instance Method Summary collapse

Methods inherited from Script

#cmd_from_config, #execute, #execute_in

Methods inherited from Base

#initialize

Methods included from OutputHelper

#trace, #verbose, #warning

Constructor Details

This class inherits a constructor from Texas::Build::Task::Base

Instance Method Details

#cmdObject



9
10
11
# File 'lib/texas/build/task/open_pdf.rb', line 9

def cmd
  cmd_from_config :open, DEFAULT_OPEN_CMD
end

#runObject



13
14
15
16
17
# File 'lib/texas/build/task/open_pdf.rb', line 13

def run
  if cmd && build.options.open_pdf
    execute cmd
  end
end