Sha256: 521f13151140468c46a42daa480f05d8c5d947495f7188950f0fc2e981aacdf0

Contents?: true

Size: 489 Bytes

Versions: 5

Compression:

Stored size: 489 Bytes

Contents

# frozen_string_literal: true

module Fear
  module PartialFunction
    # Any is an object which is always truthy
    # @api private
    class Any
      class << self
        # @param _other [any]
        # @return [true]
        def ===(_other)
          true
        end

        # @param _other [any]
        # @return [true]
        def ==(_other)
          true
        end

        # @return [Proc]
        def to_proc
          proc { true }
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
fear-3.0.0 lib/fear/partial_function/any.rb
fear-2.0.1 lib/fear/partial_function/any.rb
fear-2.0.0 lib/fear/partial_function/any.rb
fear-1.2.0 lib/fear/partial_function/any.rb
fear-1.1.0 lib/fear/partial_function/any.rb