Sha256: c7156021ebae49d1d703a9bdffb76b66b957b1ac581022a11b7cd49d049b160b

Contents?: true

Size: 220 Bytes

Versions: 4

Compression:

Stored size: 220 Bytes

Contents

# frozen_string_literal: true

module Pipeable
  module Steps
    # Wraps Dry Monads `#or` method as a step.
    class Or < Abstract
      def call(result) = result.or { |input| base_block.call input }
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
pipeable-0.4.0 lib/pipeable/steps/or.rb
pipeable-0.3.0 lib/pipeable/steps/or.rb
pipeable-0.2.0 lib/pipeable/steps/or.rb
pipeable-0.1.0 lib/pipeable/steps/or.rb