Class: Steep::Index::RBSIndex::GlobalEntry
- Defined in:
- lib/steep/index/rbs_index.rb
Instance Attribute Summary collapse
-
#declarations ⇒ Object
readonly
Returns the value of attribute declarations.
-
#global_name ⇒ Object
readonly
Returns the value of attribute global_name.
Instance Method Summary collapse
- #add_declaration(decl) ⇒ Object
-
#initialize(global_name:) ⇒ GlobalEntry
constructor
A new instance of GlobalEntry.
Constructor Details
#initialize(global_name:) ⇒ GlobalEntry
Returns a new instance of GlobalEntry.
110 111 112 113 |
# File 'lib/steep/index/rbs_index.rb', line 110 def initialize(global_name:) @global_name = global_name @declarations = Set[] end |
Instance Attribute Details
#declarations ⇒ Object (readonly)
Returns the value of attribute declarations.
108 109 110 |
# File 'lib/steep/index/rbs_index.rb', line 108 def declarations @declarations end |
#global_name ⇒ Object (readonly)
Returns the value of attribute global_name.
107 108 109 |
# File 'lib/steep/index/rbs_index.rb', line 107 def global_name @global_name end |
Instance Method Details
#add_declaration(decl) ⇒ Object
115 116 117 118 119 120 121 122 123 124 |
# File 'lib/steep/index/rbs_index.rb', line 115 def add_declaration(decl) case decl when RBS::AST::Declarations::Global declarations << decl else raise end self end |