Exception: Pickles::Ambiguous

Inherits:
StandardError
  • Object
show all
Defined in:
lib/cucumber/pickles/errors/ambigious.rb

Instance Method Summary collapse

Constructor Details

#initialize(locator, within, search_params, message) ⇒ Ambiguous

Returns a new instance of Ambiguous.



3
4
5
6
7
8
# File 'lib/cucumber/pickles/errors/ambigious.rb', line 3

def initialize(locator, within, search_params, message)
  @search_params= search_params
  @within = within
  @locator = locator
  @message = message.to_s
end

Instance Method Details

#messageObject



10
11
12
13
14
15
# File 'lib/cucumber/pickles/errors/ambigious.rb', line 10

def message
  "Ambiguous(locator: #{@locator}, count: #{_nodes.count}" \
    + (@message != "" ? ", message: #@message" : "") \
    + (@within.respond_to?(:path) ? "\n within: #{@within.path}" : "") \
     + "): \n#{_inspect_nodes}"
end