Sha256: 035e8919945bf17d8d6b0aecf6ce747da4d3945c2efbc696e0f2a10b6576eef6

Contents?: true

Size: 458 Bytes

Versions: 2

Compression:

Stored size: 458 Bytes

Contents

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

2 entries across 2 versions & 1 rubygems

Version Path
fear-1.0.0 lib/fear/partial_function/any.rb
fear-0.11.0 lib/fear/partial_function/any.rb