class RBT::GeneratePdfTutorial

Constants

STORE_PDF_FILE_HERE
#

STORE_PDF_FILE_HERE

Where to store the .pdf file.

#
URL
#

URL

This URl specifies which URL is to be used.

#

Public Class Methods

new( run_already = true ) click to toggle source
#

initialize

#
# File lib/rbt/generate_files/generate_pdf_tutorial.rb, line 46
def initialize(
    run_already = true
  )
  reset
  run if run_already
end
store_pdf_file_where?() click to toggle source
#

RBT::GeneratePdfTutorial.store_pdf_file_where?

#
# File lib/rbt/generate_files/generate_pdf_tutorial.rb, line 39
def self.store_pdf_file_where?
  STORE_PDF_FILE_HERE
end

Public Instance Methods

reset() click to toggle source
#

reset

#
Calls superclass method RBT::LeanPrototype#reset
# File lib/rbt/generate_files/generate_pdf_tutorial.rb, line 56
def reset
  super()
  infer_the_namespace
  @store_where = STORE_PDF_FILE_HERE
end
run() click to toggle source
#

run

#
# File lib/rbt/generate_files/generate_pdf_tutorial.rb, line 72
def run
  # ======================================================================= #
  # First, always get rid of the old .pdf file.
  # ======================================================================= #
  remove_file(store_where?) if File.exist?(store_where?)
  # ======================================================================= #
  # Here we should have generated it.
  # ======================================================================= #
  opne 'Next trying the URL `'+sfancy(URL)+'`.'
  open(URL)
  result = "#{rev}The .pdf file should now exist at "\
           "`#{sfile(store_where?)}#{rev}`".dup
  if File.exist? store_where?
    result << ' (Yes, it does exist there)'
  end
  result << '.'
  opne result 
end
store_where?() click to toggle source
#

store_where?

#
# File lib/rbt/generate_files/generate_pdf_tutorial.rb, line 65
def store_where?
  @store_where
end