Sha256: f4af5bb2d4f446e76678b428e3bdf91009ca6559690f76c767e2685c259dd7e9
Contents?: true
Size: 594 Bytes
Versions: 8
Compression:
Stored size: 594 Bytes
Contents
module Blueprints module Helper def build_plan(*names) Plan.build(*names) Plan.copy_ivars(self) end alias :build :build_plan def demolish(*args) options = args.extract_options! Blueprints.delete_tables(*args) if options[:undo] == :all Plan.executed_plans.clear else undo = [options[:undo]].flatten.compact unless (not_found = undo - Plan.executed_plans.to_a).blank? raise(ArgumentError, "Scenario(s) #{not_found} not found") end Plan.executed_plans -= undo end end end end
Version data entries
8 entries across 8 versions & 2 rubygems