RobertDober/lab42_core

View on GitHub
lib/lab42/core/behavior/negation.rb

Summary

Maintainability
A
0 mins
Test Coverage

module Lab42
  module Behavior
    module Negation
      def negated
        ProcBehavior.new do |*args, &blk|
          !self.(*args, &blk)
        end
      end
    end # module Composition
    include Negation
  end # class Behavior
end # module Lab42
# SPDX-License-Identifier: Apache-2.0