Sha256: d8f36dfdffcbbd078b70e10fa012a1ad5730805ff91fa4d9a53d94c467a36843

Contents?: true

Size: 372 Bytes

Versions: 5

Compression:

Stored size: 372 Bytes

Contents

module ActiveShepherd
  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
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
activeshepherd-0.8.4 lib/active_shepherd/active_record_shim.rb
activeshepherd-0.8.3 lib/active_shepherd/active_record_shim.rb
activeshepherd-0.8.2 lib/active_shepherd/active_record_shim.rb
activeshepherd-0.8.1 lib/active_shepherd/active_record_shim.rb
activeshepherd-0.8.0 lib/active_shepherd/active_record_shim.rb