Method: Sequel::NoMatchingRow#initialize

Defined in:
lib/sequel/exceptions.rb

#initialize(msg = nil) ⇒ NoMatchingRow

If the first argument is a Sequel::Dataset, set the dataset related to the exception to that argument, instead of assuming it is the exception message.



109
110
111
112
113
114
115
# File 'lib/sequel/exceptions.rb', line 109

def initialize(msg=nil)
  if msg.is_a?(Sequel::Dataset)
    @dataset = msg
    msg = nil
  end
  super
end