Sha256: deaf862c0300b0447094ec2b39cf45aa14b44288a8a371ecf44b49078a404fb5
Contents?: true
Size: 403 Bytes
Versions: 6
Compression:
Stored size: 403 Bytes
Contents
# frozen_string_literal: true require "dry/logic/operations/unary" require "dry/logic/result" module Dry module Logic module Operations class Negation < Unary def type :not end def call(input) Result.new(rule.(input).failure?, id) { ast(input) } end def [](input) !rule[input] end end end end end
Version data entries
6 entries across 6 versions & 2 rubygems