Class: RBI::Scope
- Inherits:
-
Tree
- Object
- Node
- NodeWithComments
- Tree
- RBI::Scope
- Extended by:
- T::Helpers, T::Sig
- Includes:
- Indexable
- Defined in:
- lib/rbi/model.rb,
lib/rbi/index.rb,
lib/rbi/rewriters/merge_trees.rb
Overview
Scopes
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Tree
Attributes inherited from NodeWithComments
Attributes inherited from Node
Instance Method Summary collapse
Methods inherited from Tree
#<<, #add_sig_templates!, #annotate!, #deannotate!, #empty?, #filter_versions!, #flatten_singleton_methods!, #flatten_visibilities!, #group_nodes!, #index, #initialize, #merge, #nest_non_public_members!, #nest_singleton_methods!, #nest_top_level_members!, #replace_attributes_with_methods!, #sort_nodes!
Methods inherited from NodeWithComments
#annotations, #initialize, #merge_with, #version_requirements
Methods inherited from Node
#compatible_with?, #detach, #initialize, #merge_with, #parent_conflict_tree, #parent_scope, #print, #rbs_print, #rbs_string, #replace, #satisfies_version?, #string
Constructor Details
This class inherits a constructor from RBI::Tree
Instance Method Details
#dup_empty ⇒ Object
358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 |
# File 'lib/rbi/rewriters/merge_trees.rb', line 358 def dup_empty case self when Module Module.new(name, loc: loc, comments: comments) when TEnum TEnum.new(name, loc: loc, comments: comments) when TEnumBlock TEnumBlock.new(loc: loc, comments: comments) when TStruct TStruct.new(name, loc: loc, comments: comments) when Class Class.new(name, superclass_name: superclass_name, loc: loc, comments: comments) when Struct Struct.new(name, members: members, keyword_init: keyword_init, loc: loc, comments: comments) when SingletonClass SingletonClass.new(loc: loc, comments: comments) else raise DuplicateNodeError, "Can't duplicate node #{self}" end end |
#fully_qualified_name ⇒ Object
184 |
# File 'lib/rbi/model.rb', line 184 def fully_qualified_name; end |
#index_ids ⇒ Object
93 94 95 |
# File 'lib/rbi/index.rb', line 93 def index_ids [fully_qualified_name] end |
#to_s ⇒ Object
187 188 189 |
# File 'lib/rbi/model.rb', line 187 def to_s fully_qualified_name end |