Method: Capybara::Queries::CurrentPathQuery#initialize

Defined in:
lib/capybara/queries/current_path_query.rb

#initialize(expected_path, **options, &optional_filter_block) ⇒ CurrentPathQuery

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of CurrentPathQuery.



9
10
11
12
13
14
15
16
17
18
# File 'lib/capybara/queries/current_path_query.rb', line 9

def initialize(expected_path, **options, &optional_filter_block)
  super(options)
  @expected_path = expected_path
  @options = {
    url: !@expected_path.is_a?(Regexp) && !::Addressable::URI.parse(@expected_path || '').hostname.nil?,
    ignore_query: false
  }.merge(options)
  @filter_block = optional_filter_block
  assert_valid_keys
end