class Parlour::Types::Class

A type which represents the class of a type, rather than an instance. For example, “String” means an instance of String, but “Class(String)” means the actual String class.

Attributes

type[R]

Public Class Methods

new(type) click to toggle source
# File lib/parlour/types.rb, line 406
def initialize(type)
  @type = to_type(type)
end

Public Instance Methods

==(other) click to toggle source
# File lib/parlour/types.rb, line 411
def ==(other)
  Class === other && type == other.type
end
describe() click to toggle source
# File lib/parlour/types.rb, line 429
def describe
  "Class<#{type.describe}>"
end
generate_rbi() click to toggle source
# File lib/parlour/types.rb, line 419
def generate_rbi
  "T.class_of(#{type.generate_rbi})"
end
generate_rbs() click to toggle source
# File lib/parlour/types.rb, line 424
def generate_rbs
  "singleton(#{type.generate_rbs})"
end