Class: Locator::Element::ElementsList
- Inherits:
-
Locator::Element
- Object
- Locator::Element
- Locator::Element::ElementsList
- Defined in:
- lib/locator/element/elements_list.rb
Instance Attribute Summary collapse
-
#elements ⇒ Object
readonly
Returns the value of attribute elements.
Attributes inherited from Locator::Element
#attributes, #css, #locatables, #name
Instance Method Summary collapse
-
#initialize(*elements) ⇒ ElementsList
constructor
A new instance of ElementsList.
- #lookup(dom, selector, attributes) ⇒ Object
Methods inherited from Locator::Element
Constructor Details
#initialize(*elements) ⇒ ElementsList
Returns a new instance of ElementsList.
6 7 8 |
# File 'lib/locator/element/elements_list.rb', line 6 def initialize(*elements) @elements = elements end |
Instance Attribute Details
#elements ⇒ Object (readonly)
Returns the value of attribute elements.
4 5 6 |
# File 'lib/locator/element/elements_list.rb', line 4 def elements @elements end |
Instance Method Details
#lookup(dom, selector, attributes) ⇒ Object
10 11 12 |
# File 'lib/locator/element/elements_list.rb', line 10 def lookup(dom, selector, attributes) Result.new(elements.map { |element| element.send(:lookup, dom, selector, attributes) }.flatten) end |