module ActiveShepherd

Constants

AggregateMismatchError
BadChangeError
InvalidChangesError
Methods

Set up namespace for the method classes

VERSION

Public Class Methods

deep_reverse_changes(changes) click to toggle source
# File lib/active_shepherd.rb, line 21
def self.deep_reverse_changes(changes)
  DeepReverseChanges.new(changes).reverse
end
enable!(activerecord_base) click to toggle source
# File lib/active_shepherd/active_record_shim.rb, line 2
def self.enable!(activerecord_base)
  class << activerecord_base
    # FIXME: make this actually check the model to meet the criteria for being
    # an Aggregate Root
    def able_to_act_as_aggregate_root?
      true
    end

    def act_as_aggregate_root!
      include ::ActiveShepherd::AggregateRoot
    end
  end
end