class RBS::Types::ClassSingleton
属性
location[R]
name[R]
公共类方法
new(name:, location:) 点击切换源代码
# File rbs-3.8.0/lib/rbs/types.rb, line 204 def initialize(name:, location:) @name = name @location = location end
公共实例方法
==(other) 点击切换源代码
# File rbs-3.8.0/lib/rbs/types.rb, line 209 def ==(other) other.is_a?(ClassSingleton) && other.name == name end
也别名为: eql?
has_classish_type?() 点击切换源代码
# File rbs-3.8.0/lib/rbs/types.rb, line 243 def has_classish_type? false end
has_self_type?() 点击切换源代码
# File rbs-3.8.0/lib/rbs/types.rb, line 239 def has_self_type? false end
hash() 点击切换源代码
# File rbs-3.8.0/lib/rbs/types.rb, line 215 def hash self.class.hash ^ name.hash end
map_type_name() { |name, location, self| ... } 点击切换源代码
# File rbs-3.8.0/lib/rbs/types.rb, line 232 def map_type_name ClassSingleton.new( name: yield(name, location, self), location: location ) end
to_json(state = _ = nil) 点击切换源代码
# File rbs-3.8.0/lib/rbs/types.rb, line 222 def to_json(state = _ = nil) { class: :class_singleton, name: name, location: location }.to_json(state) end
to_s(level = 0) 点击切换源代码
# File rbs-3.8.0/lib/rbs/types.rb, line 226 def to_s(level = 0) "singleton(#{name})" end
with_nonreturn_void?() 点击切换源代码
# File rbs-3.8.0/lib/rbs/types.rb, line 247 def with_nonreturn_void? false end