Sha256: 7beaf5d1e5e888cb0432b53c8af6fc34285a2ccf6c0abf61f66c897d2762d864

Contents?: true

Size: 221 Bytes

Versions: 5

Compression:

Stored size: 221 Bytes

Contents

module Dry
  module Logic
    class Rule
      class Negation < Rule::Value
        def type
          :not
        end

        def call(input)
          predicate.(input).negated
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
dry-logic-0.3.0 lib/dry/logic/rule/negation.rb
dry-logic-0.2.3 lib/dry/logic/rule/negation.rb
dry-logic-0.2.2 lib/dry/logic/rule/negation.rb
dry-logic-0.2.1 lib/dry/logic/rule/negation.rb
dry-logic-0.2.0 lib/dry/logic/rule/negation.rb