module WipeOut
When working with gem please see {file:getting_started.md}
If you'd like to contribute, check out {file:development.md}
Constants
- IGNORE_ALL
- VERSION
Public Class Methods
build_plan(config: nil, &block)
click to toggle source
Builds a plan for wipe out. When ActiveRecord class is passed,
@example
UserPlan = WipeOut.build_plan do wipe_out :name end
For DSL documentation {Plans::Dsl}
@return [Plans::BuiltPlan]
# File lib/wipe_out.rb, line 29 def build_plan(config: nil, &block) config ||= WipeOut.config.dup plan = Plans::Plan.new(config) Plans::Dsl.build(plan, &block) end
config()
click to toggle source
Returns current configuration
@return [Config]
# File lib/wipe_out.rb, line 58 def config @config ||= Config.new end
configure() { |config| ... }
click to toggle source
Configures the gem, you should call it in the initializer
@example
WipeOut.configure do |config| config.ignored_attributes = %i[id inserted_at] end
For additional details, {Config}. You will be also able to modify config for specific plan. Here you only set defaults.
@return [Config]
# File lib/wipe_out.rb, line 47 def configure raise "Pass block to configure the gem" unless block_given? yield config config end