Class: PageMagic::Element::Query::SingleResult
- Inherits:
-
PageMagic::Element::Query
- Object
- PageMagic::Element::Query
- PageMagic::Element::Query::SingleResult
- Defined in:
- lib/page_magic/element/query/single_result.rb
Overview
class SingleResult - use to query when only one result should be expected
Constant Summary
Constants inherited from PageMagic::Element::Query
Instance Attribute Summary
Attributes inherited from PageMagic::Element::Query
Instance Method Summary collapse
-
#find(capybara_element, &block) ⇒ Object
Find an element The supplied block will be used to decorate the results.
Methods inherited from PageMagic::Element::Query
Constructor Details
This class inherits a constructor from PageMagic::Element::Query
Instance Method Details
#find(capybara_element, &block) ⇒ Object
Find an element The supplied block will be used to decorate the results
12 13 14 15 16 |
# File 'lib/page_magic/element/query/single_result.rb', line 12 def find(, &block) block.call .find(*selector_args, **) rescue Capybara::Ambiguous => e raise AmbiguousQueryException, e. end |