Class: RBI::TEnumBlock

Inherits:
Scope show all
Includes:
Indexable
Defined in:
lib/rbi/index.rb,
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

Methods inherited from Tree

#<<, #add_sig_templates!, #annotate!, #deannotate!, #empty?, #filter_versions!, #flatten_singleton_methods!, #flatten_visibilities!, #group_nodes!, #index, #merge, #nest_non_public_members!, #nest_singleton_methods!, #nest_top_level_members!, #replace_attributes_with_methods!, #sort_nodes!, #translate_rbs_sigs!

Methods inherited from NodeWithComments

#annotations, #merge_with, #version_requirements

Methods inherited from Node

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

Constructor Details

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

: (?loc: Loc?, ?comments: Array) ?{ (TEnumBlock node) -> void } -> void



1002
1003
1004
1005
# File 'lib/rbi/model.rb', line 1002

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

Instance Method Details

#fully_qualified_nameObject

: -> String



1009
1010
1011
# File 'lib/rbi/model.rb', line 1009

def fully_qualified_name
  "#{parent_scope&.fully_qualified_name}.enums"
end

#index_idsObject

: -> Array



214
215
216
# File 'lib/rbi/index.rb', line 214

def index_ids
  [fully_qualified_name]
end

#to_sObject

: -> String



1015
1016
1017
# File 'lib/rbi/model.rb', line 1015

def to_s
  fully_qualified_name
end