Sha256: 8b8fe94b1a76d016cdc4d4f842f5d8c7d0b3a7794ea8d1639ff5b7c13eb7df7c
Contents?: true
Size: 527 Bytes
Versions: 10
Compression:
Stored size: 527 Bytes
Contents
# frozen_string_literal: true module Kind class RespondTo include Kind::BasicObject def self.[](*args) args.each { |arg| STRICT.kind_of(::Symbol, arg) } new(args) end private_class_method :new attr_reader :inspect def initialize(method_names) @method_names = method_names @inspect = "Kind::RespondTo#{@method_names}" end def ===(value) KIND.interface?(@method_names, value) end alias_method :call, :=== alias_method :name, :inspect end end
Version data entries
10 entries across 10 versions & 1 rubygems