Class: PageEz::HasOneResult

Inherits:
Object
  • Object
show all
Defined in:
lib/page_ez/has_one_result.rb

Instance Method Summary collapse

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,
      **options
    )
  )
end