Sha256: 6c9f57c06d7ac733955b14b37722bd4a804cbbe7573034fc77a040fdb89048e0

Contents?: true

Size: 360 Bytes

Versions: 10

Compression:

Stored size: 360 Bytes

Contents

module Danica
  class Operator::Addition < Operator::Chained
    default_value :priority, 1

    def +(other)
      repack(other)
    end

    private

    default_value :symbol, :+

    def chain_operation(a, b)
      a + b
    end

    def join_proc(symbol)
      proc do |_, value|
        value.signaled? ? ' ' : " #{symbol} "
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
danica-2.7.1 lib/danica/operator/addition.rb
danica-2.6.4 lib/danica/operator/addition.rb
danica-2.6.3 lib/danica/operator/addition.rb
danica-2.6.2 lib/danica/operator/addition.rb
danica-2.6.1 lib/danica/operator/addition.rb
danica-2.6.0 lib/danica/operator/addition.rb
danica-2.5.1 lib/danica/operator/addition.rb
danica-2.5.0 lib/danica/operator/addition.rb
danica-2.4.4 lib/danica/operator/addition.rb
danica-2.4.3 lib/danica/operator/addition.rb