Class: RBI::SingletonClass

Inherits:
Scope show all
Extended by:
T::Sig
Defined in:
lib/rbi/model.rb

Instance Attribute Summary

Attributes inherited from Tree

#nodes

Attributes inherited from NodeWithComments

#comments

Attributes inherited from Node

#loc, #parent_tree

Instance Method Summary collapse

Methods inherited from Scope

#dup_empty, #index_ids, #to_s

Methods included from Indexable

#index_ids

Methods inherited from Tree

#<<, #add_sig_templates!, #annotate!, #deannotate!, #empty?, #filter_versions!, #group_nodes!, #index, #merge, #nest_non_public_methods!, #nest_singleton_methods!, #replace_attributes_with_methods!, #sort_nodes!

Methods inherited from NodeWithComments

#annotations, #merge_with, #version_requirements

Methods inherited from Node

#compatible_with?, #detach, #merge_with, #parent_conflict_tree, #parent_scope, #print, #replace, #satisfies_version?, #string

Constructor Details

#initialize(loc: nil, comments: [], &block) ⇒ SingletonClass

Returns a new instance of SingletonClass.



263
264
265
266
# File 'lib/rbi/model.rb', line 263

def initialize(loc: nil, comments: [], &block)
  super(loc: loc, comments: comments) {}
  block&.call(self)
end

Instance Method Details

#fully_qualified_nameObject



269
270
271
# File 'lib/rbi/model.rb', line 269

def fully_qualified_name
  "#{parent_scope&.fully_qualified_name}::<self>"
end