Class: GHtml2Pdf::Application

Inherits:
Object
  • Object
show all
Defined in:
lib/ghtml2pdf/application.rb

Overview

Main GHtml2Pdf application. Orchestrates the Gtk+ objects needed to load and print a web page to PDF.

Instance Method Summary collapse

Constructor Details

#initialize(argv) ⇒ Application

Returns a new instance of Application.



13
14
15
16
# File 'lib/ghtml2pdf/application.rb', line 13

def initialize(argv)
  @argument_parser = ArgumentParser.new(argv)
  default_web_context.set_process_model :multiple_secondary_processes
end

Instance Method Details

#runObject



18
19
20
21
22
23
# File 'lib/ghtml2pdf/application.rb', line 18

def run
  setup_signal_handlers
  load_uri
  Gtk.main
  destroy_view
end