Sha256: fa15f91d7a57e732ded913884fc525ca17e2fb53ff40ec44392fa7cf680919bb

Contents?: true

Size: 559 Bytes

Versions: 53

Compression:

Stored size: 559 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)

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

Version data entries

53 entries across 53 versions & 1 rubygems

Version Path
ree_lib-1.0.102 lib/ree_lib/packages/ree_dao/package/ree_dao/aggregate_dsl.rb
ree_lib-1.0.101 lib/ree_lib/packages/ree_dao/package/ree_dao/aggregate_dsl.rb
ree_lib-1.0.100 lib/ree_lib/packages/ree_dao/package/ree_dao/aggregate_dsl.rb
ree_lib-1.0.99 lib/ree_lib/packages/ree_dao/package/ree_dao/aggregate_dsl.rb
ree_lib-1.0.98 lib/ree_lib/packages/ree_dao/package/ree_dao/aggregate_dsl.rb
ree_lib-1.0.97 lib/ree_lib/packages/ree_dao/package/ree_dao/aggregate_dsl.rb
ree_lib-1.0.96 lib/ree_lib/packages/ree_dao/package/ree_dao/aggregate_dsl.rb
ree_lib-1.0.95 lib/ree_lib/packages/ree_dao/package/ree_dao/aggregate_dsl.rb
ree_lib-1.0.94 lib/ree_lib/packages/ree_dao/package/ree_dao/aggregate_dsl.rb
ree_lib-1.0.93 lib/ree_lib/packages/ree_dao/package/ree_dao/aggregate_dsl.rb
ree_lib-1.0.92 lib/ree_lib/packages/ree_dao/package/ree_dao/aggregate_dsl.rb
ree_lib-1.0.91 lib/ree_lib/packages/ree_dao/package/ree_dao/aggregate_dsl.rb
ree_lib-1.0.90 lib/ree_lib/packages/ree_dao/package/ree_dao/aggregate_dsl.rb
ree_lib-1.0.89 lib/ree_lib/packages/ree_dao/package/ree_dao/aggregate_dsl.rb
ree_lib-1.0.88 lib/ree_lib/packages/ree_dao/package/ree_dao/aggregate_dsl.rb
ree_lib-1.0.87 lib/ree_lib/packages/ree_dao/package/ree_dao/aggregate_dsl.rb
ree_lib-1.0.86 lib/ree_lib/packages/ree_dao/package/ree_dao/aggregate_dsl.rb
ree_lib-1.0.85 lib/ree_lib/packages/ree_dao/package/ree_dao/aggregate_dsl.rb
ree_lib-1.0.84 lib/ree_lib/packages/ree_dao/package/ree_dao/aggregate_dsl.rb
ree_lib-1.0.83 lib/ree_lib/packages/ree_dao/package/ree_dao/aggregate_dsl.rb