Files

DatabaseCleaner

Public Class Methods

clean() click to toggle source
# File lib/database_cleaner/configuration.rb, line 72
def clean
  strategy.clean
end
Also aliased as: clean!
clean!() click to toggle source
Alias for: clean
clean_with(*args) click to toggle source
# File lib/database_cleaner/configuration.rb, line 45
def clean_with(*args)
  strategy = create_strategy(*args)
  strategy.clean
  strategy
end
Also aliased as: clean_with!
clean_with!(*args) click to toggle source
Alias for: clean_with
create_strategy(*args) click to toggle source
# File lib/database_cleaner/configuration.rb, line 40
def create_strategy(*args)
  strategy, *strategy_args = args
  orm_strategy(strategy).new(*strategy_args)
end
orm=(orm_string) click to toggle source
# File lib/database_cleaner/configuration.rb, line 64
def orm=(orm_string)
  @orm = orm_string
end
start() click to toggle source
# File lib/database_cleaner/configuration.rb, line 68
def start
  strategy.start
end
strategy=(args) click to toggle source
# File lib/database_cleaner/configuration.rb, line 53
def strategy=(args)
  strategy, *strategy_args = args
   if strategy.is_a?(Symbol)
      @strategy = create_strategy(*args)
   elsif strategy_args.empty?
     @strategy = strategy
   else
     raise ArgumentError, "You must provide a strategy object, or a symbol for a know strategy along with initialization params."
   end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.