require 'mr/factory/record_factory' require 'mr/factory/record_stack' module MR; end module MR::Factory class ModelStack attr_reader :model def initialize(model, factory_config) @model = model @record_stack = MR::Factory::RecordStack.for_record(model.record, factory_config) end def factory_config; @record_stack.factory_config; end def create; @record_stack.create; end def destroy; @record_stack.destroy; end def create_dependencies; @record_stack.create_dependencies; end alias :create_deps :create_dependencies def destroy_dependencies; @record_stack.destroy_dependencies; end alias :destroy_deps :destroy_dependencies end end