Sha256: dc80909a7d7ab7191bea2cf21eb6b6abe848a04714584bae1bff2c226ddfd94e

Contents?: true

Size: 610 Bytes

Versions: 22

Compression:

Stored size: 610 Bytes

Contents

module ReeDao
  module AggregateDSL
    def self.included(base)
      base.extend(ClassMethods)
    end

    def self.extended(base)
      base.extend(ClassMethods)
    end

    module ClassMethods
      def aggregate(name, &proc)
        dsl = Ree::ObjectDsl.new(
          Ree.container.packages_facade, name, self, :fn
        )

        dsl.instance_exec(&proc) if block_given?
        dsl.tags(["aggregate"])
        dsl.freeze(false)
        dsl.object.set_as_compiled(false)
        dsl.link :agg_contract_for, from: :ree_dao

        Ree.container.compile(dsl.package, name)
      end
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
ree_lib-1.0.124 lib/ree_lib/packages/ree_dao/package/ree_dao/aggregate_dsl.rb
ree_lib-1.0.123 lib/ree_lib/packages/ree_dao/package/ree_dao/aggregate_dsl.rb
ree_lib-1.0.122 lib/ree_lib/packages/ree_dao/package/ree_dao/aggregate_dsl.rb
ree_lib-1.0.121 lib/ree_lib/packages/ree_dao/package/ree_dao/aggregate_dsl.rb
ree_lib-1.0.120 lib/ree_lib/packages/ree_dao/package/ree_dao/aggregate_dsl.rb
ree_lib-1.0.119 lib/ree_lib/packages/ree_dao/package/ree_dao/aggregate_dsl.rb
ree_lib-1.0.118 lib/ree_lib/packages/ree_dao/package/ree_dao/aggregate_dsl.rb
ree_lib-1.0.117 lib/ree_lib/packages/ree_dao/package/ree_dao/aggregate_dsl.rb
ree_lib-1.0.116 lib/ree_lib/packages/ree_dao/package/ree_dao/aggregate_dsl.rb
ree_lib-1.0.115 lib/ree_lib/packages/ree_dao/package/ree_dao/aggregate_dsl.rb
ree_lib-1.0.114 lib/ree_lib/packages/ree_dao/package/ree_dao/aggregate_dsl.rb
ree_lib-1.0.113 lib/ree_lib/packages/ree_dao/package/ree_dao/aggregate_dsl.rb
ree_lib-1.0.112 lib/ree_lib/packages/ree_dao/package/ree_dao/aggregate_dsl.rb
ree_lib-1.0.111 lib/ree_lib/packages/ree_dao/package/ree_dao/aggregate_dsl.rb
ree_lib-1.0.110 lib/ree_lib/packages/ree_dao/package/ree_dao/aggregate_dsl.rb
ree_lib-1.0.109 lib/ree_lib/packages/ree_dao/package/ree_dao/aggregate_dsl.rb
ree_lib-1.0.108 lib/ree_lib/packages/ree_dao/package/ree_dao/aggregate_dsl.rb
ree_lib-1.0.107 lib/ree_lib/packages/ree_dao/package/ree_dao/aggregate_dsl.rb
ree_lib-1.0.106 lib/ree_lib/packages/ree_dao/package/ree_dao/aggregate_dsl.rb
ree_lib-1.0.105 lib/ree_lib/packages/ree_dao/package/ree_dao/aggregate_dsl.rb