Class: RBI::TStruct
- Extended by:
- T::Sig
- Defined in:
- lib/rbi/model.rb
Overview
Sorbet’s T::Struct
Instance Attribute Summary
Attributes inherited from Class
Attributes inherited from Tree
Attributes inherited from NodeWithComments
Attributes inherited from Node
Instance Method Summary collapse
-
#initialize(name, loc: nil, comments: [], &block) ⇒ TStruct
constructor
A new instance of TStruct.
Methods inherited from Class
#compatible_with?, #fully_qualified_name
Methods inherited from Scope
#dup_empty, #fully_qualified_name, #index_ids, #to_s
Methods included from Indexable
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!
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(name, loc: nil, comments: [], &block) ⇒ TStruct
Returns a new instance of TStruct.
1226 1227 1228 1229 |
# File 'lib/rbi/model.rb', line 1226 def initialize(name, loc: nil, comments: [], &block) super(name, superclass_name: "::T::Struct", loc: loc, comments: comments) {} block&.call(self) end |