Sha256: 161b38ac29c93dbe0bace30d02b38d2b0133d20813f31ccea6ddb8abe060efd1
Contents?: true
Size: 397 Bytes
Versions: 10
Compression:
Stored size: 397 Bytes
Contents
# frozen_string_literal: true module Kind module Is def self.call(expected, object) __call__(Kind::Of.Module(expected), object) end def self.__call__(expected_kind, object) kind = Kind::Of.Module(object) if kind.is_a?(Class) kind <= expected_kind || false else kind == expected_kind || kind.is_a?(expected_kind) end end end end
Version data entries
10 entries across 10 versions & 1 rubygems