Class: IEHandler
- Inherits:
-
Object
show all
- Defined in:
- sample/ienavi2.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
Returns a new instance of IEHandler.
5
6
7
8
|
# File 'sample/ienavi2.rb', line 5
def initialize
@urls = []
@loop = true
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(event, *args) ⇒ Object
9
10
11
12
13
14
|
# File 'sample/ienavi2.rb', line 9
def method_missing(event, *args)
case event
when "BeforeNavigate2"
puts "Now Navigate #{args[1]}..."
end
end
|
Instance Attribute Details
#loop ⇒ Object
Returns the value of attribute loop
4
5
6
|
# File 'sample/ienavi2.rb', line 4
def loop
@loop
end
|
Instance Method Details
#onNavigateComplete2(pdisp, url) ⇒ Object
15
16
17
|
# File 'sample/ienavi2.rb', line 15
def onNavigateComplete2(pdisp, url)
@urls << url
end
|
#onOnQuit ⇒ Object
18
19
20
21
|
# File 'sample/ienavi2.rb', line 18
def onOnQuit
puts "Now Stop IE..."
@loop = false
end
|
#put_urls ⇒ Object
22
23
24
25
26
27
|
# File 'sample/ienavi2.rb', line 22
def put_urls
puts "You Navigated the URLs ..."
@urls.each_with_index do |url, i|
puts "(#{i+1}) #{url}"
end
end
|