Class: Watobo::Gui::IEControl
- Inherits:
-
BrowserControl
- Object
- BrowserControl
- Watobo::Gui::IEControl
- Defined in:
- lib/watobo/gui/browser_preview.rb
Overview
InternetExplorer Controller Class
Instance Method Summary collapse
- #busy? ⇒ Boolean
- #close ⇒ Object
- #connect ⇒ Object
- #createBrowser ⇒ Object
- #getDoc ⇒ Object
-
#initialize ⇒ IEControl
constructor
include WIN32OLE::VARIANT.
- #navigate(url) ⇒ Object
- #ready? ⇒ Boolean
- #visible=(status) ⇒ Object
Methods inherited from BrowserControl
Constructor Details
#initialize ⇒ IEControl
include WIN32OLE::VARIANT
76 77 78 79 80 |
# File 'lib/watobo/gui/browser_preview.rb', line 76 def initialize() @ie = nil createBrowser() end |
Instance Method Details
#busy? ⇒ Boolean
91 92 93 |
# File 'lib/watobo/gui/browser_preview.rb', line 91 def busy?() @ie.busy() end |
#close ⇒ Object
112 113 114 115 |
# File 'lib/watobo/gui/browser_preview.rb', line 112 def close() @ie.Quit @ie = nil end |
#connect ⇒ Object
95 96 97 |
# File 'lib/watobo/gui/browser_preview.rb', line 95 def connect() createBrowser() end |
#createBrowser ⇒ Object
82 83 84 85 86 87 88 89 |
# File 'lib/watobo/gui/browser_preview.rb', line 82 def createBrowser() @ie = WIN32OLE.new('InternetExplorer.Application') @ie.=0 @ie.=0 @ie.=0 @ie.visible = true end |
#getDoc ⇒ Object
108 109 110 |
# File 'lib/watobo/gui/browser_preview.rb', line 108 def getDoc() @ie.document.body.innerHTML.to_s end |
#navigate(url) ⇒ Object
99 100 101 102 |
# File 'lib/watobo/gui/browser_preview.rb', line 99 def navigate(url) @ie.navigate(url) end |
#ready? ⇒ Boolean
117 118 119 120 121 122 123 124 125 126 |
# File 'lib/watobo/gui/browser_preview.rb', line 117 def ready?() return false if @ie.nil? begin @ie.visible = true rescue => bang puts bang return false end return true end |
#visible=(status) ⇒ Object
104 105 106 |
# File 'lib/watobo/gui/browser_preview.rb', line 104 def visible=(status) @ie.visible = status end |