class RBS::Types::ClassSingleton
Attributes
Public Class Methods
Source
# File bundled-src/rbs-3.10.0/lib/rbs/types.rb, line 206 def initialize(name:, location:) @name = name @location = location end
Public Instance Methods
Source
# File bundled-src/rbs-3.10.0/lib/rbs/types.rb, line 211 def ==(other) other.is_a?(ClassSingleton) && other.name == name end
Also aliased as: eql?
Source
# File bundled-src/rbs-3.10.0/lib/rbs/types.rb, line 245 def has_classish_type? false end
Source
# File bundled-src/rbs-3.10.0/lib/rbs/types.rb, line 241 def has_self_type? false end
Source
# File bundled-src/rbs-3.10.0/lib/rbs/types.rb, line 217 def hash self.class.hash ^ name.hash end
Source
# File bundled-src/rbs-3.10.0/lib/rbs/types.rb, line 234 def map_type_name(&) ClassSingleton.new( name: yield(name, location, self), location: location ) end
Source
# File bundled-src/rbs-3.10.0/lib/rbs/types.rb, line 224 def to_json(state = _ = nil) { class: :class_singleton, name: name, location: location }.to_json(state) end
Source
# File bundled-src/rbs-3.10.0/lib/rbs/types.rb, line 228 def to_s(level = 0) "singleton(#{name})" end
Source
# File bundled-src/rbs-3.10.0/lib/rbs/types.rb, line 249 def with_nonreturn_void? false end