module DatabaseRewinder::Cleaner::Compatibility

Public Instance Methods

clean_with(_strategy, only: nil, except: nil, multiple: true, **) click to toggle source
# File lib/database_rewinder/compatibility.rb, line 56
def clean_with(_strategy, only: nil, except: nil, multiple: true, **)
  originals = @only, @except
  self.only, self.except = Array(only), Array(except)
  clean_all multiple: multiple
ensure
  self.only, self.except = originals
end
strategy=(args) click to toggle source
# File lib/database_rewinder/compatibility.rb, line 64
def strategy=(args)
  options = args.is_a?(Array) ? args.extract_options! : {}
  self.only = Array(options[:only]) if options.key?(:only)
  self.except = Array(options[:except]) if options.key?(:except)
end