Class: WIN32OLE

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

Instance Method Summary collapse

Instance Method Details

#find_by_id(id) ⇒ Object



13
14
15
# File 'lib/ieparser_extension.rb', line 13

def find_by_id(id)
  self.document.getElementById(id)
end

#find_by_name(name) ⇒ Object



17
18
19
20
21
22
23
24
25
# File 'lib/ieparser_extension.rb', line 17

def find_by_name(name)
  list = []
  self.document.all.each{|node|
    if node.getAttribute('name') == name
      list << node
    end
  }
  list.first
end

#search(expression) ⇒ Object



5
6
7
# File 'lib/ieparser_extension.rb', line 5

def search(expression)
  IEParser.new(self,expression).select_nodes
end

#search_path(expression) ⇒ Object



9
10
11
# File 'lib/ieparser_extension.rb', line 9

def search_path(expression)
  IEParserTopDown.new(self,expression).select_nodes
end