Sha256: 02d1424aeb52a60aa3d13ccf45a02f9de73f427a0c26d0a226ceab644c9fdd26

Contents?: true

Size: 290 Bytes

Versions: 10

Compression:

Stored size: 290 Bytes

Contents

# frozen_string_literal: true

module Kind
  module OF
    extend self

    def class?(value) # :nodoc:
      value.kind_of?(::Class)
    end

    def module?(value) # :nodoc:
      ::Module == value || (value.kind_of?(::Module) && !class?(value))
    end
  end

  private_constant :OF
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
kind-5.10.0 lib/kind/__lib__/of.rb
kind-5.9.0 lib/kind/__lib__/of.rb
kind-5.8.1 lib/kind/__lib__/of.rb
kind-5.8.0 lib/kind/__lib__/of.rb
kind-5.7.0 lib/kind/__lib__/of.rb
kind-5.6.0 lib/kind/__lib__/of.rb
kind-5.5.0 lib/kind/__lib__/of.rb
kind-5.4.1 lib/kind/__lib__/of.rb
kind-5.4.0 lib/kind/__lib__/of.rb
kind-5.3.0 lib/kind/__lib__/of.rb