Class: StraightShooter
- Inherits:
-
Object
- Object
- StraightShooter
- Defined in:
- lib/straight_shooter.rb
Instance Attribute Summary collapse
-
#app ⇒ Object
Returns the value of attribute app.
-
#page ⇒ Object
Returns the value of attribute page.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(url, filename = nil) ⇒ StraightShooter
constructor
A new instance of StraightShooter.
- #run ⇒ Object (also: #run!)
Constructor Details
#initialize(url, filename = nil) ⇒ StraightShooter
Returns a new instance of StraightShooter.
13 14 15 16 17 |
# File 'lib/straight_shooter.rb', line 13 def initialize(url, filename = nil) self.app = Qt::Application.new(ARGV) self.page = Page.new(url, filename) page.connect(page, SIGNAL('finished(bool)'), app, SLOT('quit()')) end |
Instance Attribute Details
#app ⇒ Object
Returns the value of attribute app.
7 8 9 |
# File 'lib/straight_shooter.rb', line 7 def app @app end |
#page ⇒ Object
Returns the value of attribute page.
7 8 9 |
# File 'lib/straight_shooter.rb', line 7 def page @page end |
Class Method Details
.render(url, filename = nil) ⇒ Object
9 10 11 |
# File 'lib/straight_shooter.rb', line 9 def self.render(url, filename = nil) self.new(url, filename).run! end |
Instance Method Details
#run ⇒ Object Also known as: run!
19 20 21 22 |
# File 'lib/straight_shooter.rb', line 19 def run page.load! app.exec end |