Sha256: 8ae05d9324caa1d9a13ac24e63cd33a53b0867ba94cfdf7539b1bde2e7f0a6bb

Contents?: true

Size: 511 Bytes

Versions: 43

Compression:

Stored size: 511 Bytes

Contents

module Bmg
  module Operator
    module Unary
      include Operator

      def bind(binding)
        _with_operand(operand.bind(binding))
      end

    protected

      attr_accessor :operand

      def _visit(parent, visitor)
        visitor.call(self, parent)
        operand._visit(self, visitor)
      end

      def _with_operand(operand)
        dup.tap{|d| d.operand = operand }
      end

      def operands
        [operand]
      end

    end # module Unary
  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/unary.rb
bmg-0.23.2 lib/bmg/operator/shared/unary.rb
bmg-0.23.1 lib/bmg/operator/shared/unary.rb
bmg-0.23.0 lib/bmg/operator/shared/unary.rb
bmg-0.21.5 lib/bmg/operator/shared/unary.rb
bmg-0.21.4 lib/bmg/operator/shared/unary.rb
bmg-0.20.5 lib/bmg/operator/shared/unary.rb
bmg-0.19.3 lib/bmg/operator/shared/unary.rb
bmg-0.21.3 lib/bmg/operator/shared/unary.rb
bmg-0.21.2 lib/bmg/operator/shared/unary.rb
bmg-0.21.0 lib/bmg/operator/shared/unary.rb
bmg-0.20.4 lib/bmg/operator/shared/unary.rb
bmg-0.20.2 lib/bmg/operator/shared/unary.rb
bmg-0.20.1 lib/bmg/operator/shared/unary.rb
bmg-0.20.0 lib/bmg/operator/shared/unary.rb
bmg-0.19.2 lib/bmg/operator/shared/unary.rb
bmg-0.19.1 lib/bmg/operator/shared/unary.rb
bmg-0.19.0 lib/bmg/operator/shared/unary.rb
bmg-0.18.15 lib/bmg/operator/shared/unary.rb
bmg-0.18.14 lib/bmg/operator/shared/unary.rb