class T::Types::TypeParameter

Public Class Methods

new(name) click to toggle source
# File lib/types/types/type_parameter.rb, line 6
def initialize(name)
  raise ArgumentError.new("not a symbol: #{name}") unless name.is_a?(Symbol)
  @name = name
end

Public Instance Methods

name() click to toggle source
# File lib/types/types/type_parameter.rb, line 19
def name
  "T.type_parameter(:#{@name})"
end
subtype_of_single?(type) click to toggle source
# File lib/types/types/type_parameter.rb, line 15
def subtype_of_single?(type)
  true
end
valid?(obj) click to toggle source
# File lib/types/types/type_parameter.rb, line 11
def valid?(obj)
  true
end