Sha256: 97835099f349befef50847694e3a2b842731c6199bad0a5d12bf3afc6dbe67f1

Contents?: true

Size: 389 Bytes

Versions: 3

Compression:

Stored size: 389 Bytes

Contents

# frozen_string_literal: true

require 'plumb/steppable'

module Plumb
  class And
    include Steppable

    attr_reader :left, :right

    def initialize(left, right)
      @left = left
      @right = right
      freeze
    end

    private def _inspect
      %((#{@left.inspect} >> #{@right.inspect}))
    end

    def call(result)
      result.map(@left).map(@right)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
plumb-0.0.3 lib/plumb/and.rb
plumb-0.0.2 lib/plumb/and.rb
plumb-0.0.1 lib/plumb/and.rb