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