Method: Capybara::Queries::TitleQuery#initialize

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

#initialize(expected_title, **options) ⇒ TitleQuery

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 TitleQuery.



7
8
9
10
11
12
13
# File 'lib/capybara/queries/title_query.rb', line 7

def initialize(expected_title, **options)
  @expected_title = expected_title.is_a?(Regexp) ? expected_title : expected_title.to_s
  @options = options
  super(@options)
  @search_regexp = Helpers.to_regexp(@expected_title, all_whitespace: true, exact: options.fetch(:exact, false))
  assert_valid_keys
end