Class: Watir::HTML::SpecExtractor

Inherits:
Object
  • Object
show all
Defined in:
lib/watir-webdriver/html/spec_extractor.rb

Instance Method Summary collapse

Constructor Details

#initialize(uri) ⇒ SpecExtractor

Returns a new instance of SpecExtractor.



6
7
8
# File 'lib/watir-webdriver/html/spec_extractor.rb', line 6

def initialize(uri)
  @uri = uri
end

Instance Method Details

#errorsObject



20
21
22
# File 'lib/watir-webdriver/html/spec_extractor.rb', line 20

def errors
  @errors ||= []
end


36
37
38
39
# File 'lib/watir-webdriver/html/spec_extractor.rb', line 36

def print_hierarchy
  process if @interfaces.nil?
  sorter.print
end

#processObject



10
11
12
13
14
15
16
17
18
# File 'lib/watir-webdriver/html/spec_extractor.rb', line 10

def process
  download_and_parse
  extract_idl_parts
  extract_interface_map
  build_result
rescue
  p errors
  raise
end

#sorted_interfacesObject

returns a topoligically sorted array of WebIDL::Ast::Interface objects



28
29
30
31
32
33
34
# File 'lib/watir-webdriver/html/spec_extractor.rb', line 28

def sorted_interfaces
  process if @interfaces.nil?

  sorter.sort.map { |name|
    @interfaces_by_name[name] or puts "ignoring interface: #{name}"
  }.flatten.compact
end