Class: Watir::HTML::SpecExtractor
- Inherits:
-
Object
- Object
- Watir::HTML::SpecExtractor
- Defined in:
- lib/watir-webdriver/html/spec_extractor.rb
Instance Method Summary (collapse)
- - (Object) errors
- - (Object) fetch_interface(interface)
-
- (SpecExtractor) initialize(uri)
constructor
A new instance of SpecExtractor.
- - (Object) print_hierarchy
- - (Object) process
-
- (Object) sorted_interfaces
returns a topoligically sorted array of WebIDL::Ast::Interface objects.
Constructor Details
- (SpecExtractor) initialize(uri)
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
- (Object) errors
20 21 22 |
# File 'lib/watir-webdriver/html/spec_extractor.rb', line 20 def errors @errors ||= [] end |
- (Object) fetch_interface(interface)
41 42 43 |
# File 'lib/watir-webdriver/html/spec_extractor.rb', line 41 def fetch_interface(interface) @interfaces_by_name[interface] or raise "#{interface} not found in IDL" end |
- (Object) print_hierarchy
36 37 38 39 |
# File 'lib/watir-webdriver/html/spec_extractor.rb', line 36 def print_hierarchy process if @interfaces.nil? sorter.print end |
- (Object) process
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 |
- (Object) sorted_interfaces
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 |