Sha256: 09a06362f07bcea137484aa942741b12cacba364c7b5d65cf677e27d06082787

Contents?: true

Size: 322 Bytes

Versions: 1

Compression:

Stored size: 322 Bytes

Contents

module Dry
  module Logic
    class Rule::Result < Rule
      def call(input)
        result = input[name]
        return result unless result.success?
        result_input = result.input
        Result::Wrapped.new(input, predicate.(result_input), self)
      end

      def type
        :res
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
dry-logic-0.1.1 lib/dry/logic/rule/result.rb