Class: PageEz::HasOneResult
- Inherits:
-
Object
- Object
- PageEz::HasOneResult
- Defined in:
- lib/page_ez/has_one_result.rb
Instance Method Summary collapse
-
#initialize(container:, selector:, options:, constructor:) ⇒ HasOneResult
constructor
A new instance of HasOneResult.
Constructor Details
#initialize(container:, selector:, options:, constructor:) ⇒ HasOneResult
Returns a new instance of HasOneResult.
5 6 7 8 9 10 11 12 |
# File 'lib/page_ez/has_one_result.rb', line 5 def initialize(container:, selector:, options:, constructor:) @result = constructor.call( container.find( selector, ** ) ) end |