Sha256: f8f75089e6df1249628cd7a839f58d0c2e7f81c7e188f8394c0e866583cb74f6

Contents?: true

Size: 328 Bytes

Versions: 4

Compression:

Stored size: 328 Bytes

Contents

# frozen_string_literal: true

module Kind
  module Boolean
    extend self, TypeChecker

    def kind; [TrueClass, FalseClass].freeze; end

    def name; 'Boolean'; end

    def ===(value)
      ::TrueClass === value || ::FalseClass === value
    end
  end

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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
kind-5.1.0 lib/kind/core/type_checkers/custom/boolean.rb
kind-5.0.0 lib/kind/type_checkers/custom/boolean.rb
kind-4.1.0 lib/kind/type_checkers/custom/boolean.rb
kind-4.0.0 lib/kind/type_checkers/custom/boolean.rb