class RBS::Types::Bases::Base
Attributes
location
[R]
Location[bot, bot]?
Public Class Methods
(location: Location[bot, bot]?) → void
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/lib/rbs/types.rb, line 45 def initialize(location:) @location = location end
Public Instance Methods
(untyped other) → bool
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/lib/rbs/types.rb, line 49 def ==(other) other.is_a?(self.class) end
Also aliased as: eql?, eql?
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/lib/rbs/types.rb, line 98 def has_classish_type? self.is_a?(Bases::Instance) || self.is_a?(Bases::Class) end
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/lib/rbs/types.rb, line 94 def has_self_type? self.is_a?(Types::Bases::Self) end
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/lib/rbs/types.rb, line 53 def hash self.class.hash end
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/lib/rbs/types.rb, line 64 def to_json(state = nil) klass = to_s.to_sym { class: klass, location: location }.to_json(state) end
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/lib/rbs/types.rb, line 69 def to_s(level = 0) case self when Types::Bases::Bool 'bool' when Types::Bases::Void 'void' when Types::Bases::Any raise when Types::Bases::Nil 'nil' when Types::Bases::Top 'top' when Types::Bases::Bottom 'bot' when Types::Bases::Self 'self' when Types::Bases::Instance 'instance' when Types::Bases::Class 'class' else raise "Unexpected base type: #{inspect}" end end
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/lib/rbs/types.rb, line 102 def with_nonreturn_void? self.is_a?(Bases::Void) end