Sha256: 1026e3322d5fea2df9f8304486889778e5aa24971c3e47b375e77c65146e4cb0

Contents?: true

Size: 369 Bytes

Versions: 5

Compression:

Stored size: 369 Bytes

Contents

module Dry
  module Types
    module Result
      class Success < Struct.new(:input)
        def success?
          true
        end

        def failure?
          false
        end
      end

      class Failure < Struct.new(:input, :error)
        def success?
          false
        end

        def failure?
          true
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
dry-types-0.8.1 lib/dry/types/result.rb
dry-types-0.8.0 lib/dry/types/result.rb
dry-types-0.7.2 lib/dry/types/result.rb
dry-types-0.7.1 lib/dry/types/result.rb
dry-types-0.7.0 lib/dry/types/result.rb