Sha256: e299d59ba12636295f8e90498f52b4c4225a043ac86c3038afd291b31b2e96bf

Contents?: true

Size: 523 Bytes

Versions: 43

Compression:

Stored size: 523 Bytes

Contents

module Bmg
  module Operator
    module Nary
      include Operator

      def bind(binding)
        _with_operands(operands.map{|op| op.bind(binding) })
      end

    protected

      attr_accessor :operands

      def _with_operands(operands)
        dup.tap{|d| d.operands = operands }
      end

      def _visit(parent, visitor)
        visitor.call(self, parent)
        operands.each{|op|
          op.send(:_visit, self, visitor)
        }
      end

    end # module Nary
  end # module Operator
end # module Bmg

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
bmg-0.23.3 lib/bmg/operator/shared/nary.rb
bmg-0.23.2 lib/bmg/operator/shared/nary.rb
bmg-0.23.1 lib/bmg/operator/shared/nary.rb
bmg-0.23.0 lib/bmg/operator/shared/nary.rb
bmg-0.21.5 lib/bmg/operator/shared/nary.rb
bmg-0.21.4 lib/bmg/operator/shared/nary.rb
bmg-0.20.5 lib/bmg/operator/shared/nary.rb
bmg-0.19.3 lib/bmg/operator/shared/nary.rb
bmg-0.21.3 lib/bmg/operator/shared/nary.rb
bmg-0.21.2 lib/bmg/operator/shared/nary.rb
bmg-0.21.0 lib/bmg/operator/shared/nary.rb
bmg-0.20.4 lib/bmg/operator/shared/nary.rb
bmg-0.20.2 lib/bmg/operator/shared/nary.rb
bmg-0.20.1 lib/bmg/operator/shared/nary.rb
bmg-0.20.0 lib/bmg/operator/shared/nary.rb
bmg-0.19.2 lib/bmg/operator/shared/nary.rb
bmg-0.19.1 lib/bmg/operator/shared/nary.rb
bmg-0.19.0 lib/bmg/operator/shared/nary.rb
bmg-0.18.15 lib/bmg/operator/shared/nary.rb
bmg-0.18.14 lib/bmg/operator/shared/nary.rb