Class: RBS::Types::Bases::Any

Inherits:
Base
  • Object
show all
Defined in:
lib/rbs/types.rb,
sig/types.rbs

Instance Attribute Summary

Attributes inherited from Base

#location

Instance Method Summary collapse

Methods inherited from Base

#==, #has_classish_type?, #has_self_type?, #hash, #to_json, #with_nonreturn_void?

Methods included from NoTypeName

#map_type_name

Methods included from EmptyEachType

#each_type, #map_type

Methods included from NoSubst

#sub

Methods included from NoFreeVariables

#free_variables

Methods included from _TypeBase

#each_type, #free_variables, #has_classish_type?, #has_self_type?, #map_type_name, #sub, #with_nonreturn_void?

Constructor Details

#initialize(location:, todo: false) ⇒ Any

Returns a new instance of Any.

Parameters:

  • location: (Location[bot, bot], nil)
  • todo: (Boolean) (defaults to: false)


110
111
112
113
114
115
# File 'lib/rbs/types.rb', line 110

def initialize(location:, todo: false)
  super(location: location)
  if todo
    @string = "__todo__"
  end
end

Instance Method Details

#to_s(level = 0) ⇒ Object



117
118
119
# File 'lib/rbs/types.rb', line 117

def to_s(level=0)
  @string || "untyped"
end