Method: Cucumber::Undefined.from

Defined in:
lib/cucumber/errors.rb

.from(result, step_name) ⇒ Object

[View source] [View on GitHub]

8
9
10
11
12
13
14
15
16
# File 'lib/cucumber/errors.rb', line 8

def self.from(result, step_name)
  return result.with_message(with_prefix(result.message)) if result.is_a?(self)

  begin
    raise self, with_prefix(step_name)
  rescue StandardError => e
    e
  end
end