Sha256: c75d3fcfebda3e5921323883cff84d6c41e7c3373482c36388748fe1fcff23cc

Contents?: true

Size: 307 Bytes

Versions: 11

Compression:

Stored size: 307 Bytes

Contents

# frozen_string_literal: true

module Kind
  module Callable
    extend self, ::Kind::Object

    def kind; raise NotImplementedError; end

    def name; 'Callable'; end

    def ===(value)
      value.respond_to?(:call)
    end
  end

  def self.Callable?(*values)
    KIND.of?(Callable, values)
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
kind-5.10.0 lib/kind/objects/modules/custom/callable.rb
kind-5.9.0 lib/kind/objects/modules/custom/callable.rb
kind-5.8.1 lib/kind/objects/modules/custom/callable.rb
kind-5.8.0 lib/kind/objects/modules/custom/callable.rb
kind-5.7.0 lib/kind/objects/modules/custom/callable.rb
kind-5.6.0 lib/kind/objects/modules/custom/callable.rb
kind-5.5.0 lib/kind/objects/modules/custom/callable.rb
kind-5.4.1 lib/kind/objects/modules/custom/callable.rb
kind-5.4.0 lib/kind/objects/modules/custom/callable.rb
kind-5.3.0 lib/kind/objects/modules/custom/callable.rb
kind-5.2.0 lib/kind/objects/modules/custom/callable.rb