Sha256: 8568ee68b1817a0852bb3c8fa7179a9361f40c7038d96fedbf789444530eefbd

Contents?: true

Size: 489 Bytes

Versions: 5

Compression:

Stored size: 489 Bytes

Contents

module Alf
  module Lang
    module ObjectOriented
      module AggregationMethods

        def self.def_aggregator_method(name, clazz)
          define_method(name) do |*args, &block|
            clazz.new(*args, &block).aggregate(_self_operand.to_cog)
          end
        end

        Aggregator.listen do |name, clazz|
          def_aggregator_method(name, clazz)
        end

      end # module AggregationMethods
    end # module ObjectOriented
  end # module Lang
end # module Alf

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
alf-core-0.16.3 lib/alf/lang/oo/aggregation_methods.rb
alf-core-0.16.2 lib/alf/lang/oo/aggregation_methods.rb
alf-core-0.16.1 lib/alf/lang/oo/aggregation_methods.rb
alf-core-0.16.0 lib/alf/lang/oo/aggregation_methods.rb
alf-core-0.15.0 lib/alf/lang/oo/aggregation_methods.rb