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



17
18
19
# File 'lib/watir-webdriver/html/spec_extractor.rb', line 17

def errors
  @errors ||= []
end


33
34
35
36
# File 'lib/watir-webdriver/html/spec_extractor.rb', line 33

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

#processObject



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

def process
  download_and_parse
  extract_idl_parts
  extract_interface_map
  build_result
end

#sorted_interfacesObject

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



25
26
27
28
29
30
31
# File 'lib/watir-webdriver/html/spec_extractor.rb', line 25

def sorted_interfaces
  process if @interfaces.nil?

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