Class: Cucumber::StepMatchSearch::AssertUnambiguousMatch
- Inherits:
-
Object
- Object
- Cucumber::StepMatchSearch::AssertUnambiguousMatch
- Defined in:
- lib/cucumber/step_match_search.rb
Instance Method Summary collapse
- #call(step_name) ⇒ Object
-
#initialize(search, configuration) ⇒ AssertUnambiguousMatch
constructor
A new instance of AssertUnambiguousMatch.
Constructor Details
#initialize(search, configuration) ⇒ AssertUnambiguousMatch
Returns a new instance of AssertUnambiguousMatch.
14 15 16 |
# File 'lib/cucumber/step_match_search.rb', line 14 def initialize(search, configuration) @search, @configuration = search, configuration end |
Instance Method Details
#call(step_name) ⇒ Object
18 19 20 21 22 |
# File 'lib/cucumber/step_match_search.rb', line 18 def call(step_name) result = @search.call(step_name) raise Cucumber::Ambiguous.new(step_name, result, @configuration.guess?) if result.length > 1 result end |