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.
120 121 122 123 |
# File 'lib/steep/index/rbs_index.rb', line 120 def initialize(global_name:) @global_name = global_name @declarations = Set[] end |
Instance Attribute Details
#declarations ⇒ Object (readonly)
Returns the value of attribute declarations.
118 119 120 |
# File 'lib/steep/index/rbs_index.rb', line 118 def declarations @declarations end |
#global_name ⇒ Object (readonly)
Returns the value of attribute global_name.
117 118 119 |
# File 'lib/steep/index/rbs_index.rb', line 117 def global_name @global_name end |
Instance Method Details
#add_declaration(decl) ⇒ Object
125 126 127 128 129 130 131 132 133 134 |
# File 'lib/steep/index/rbs_index.rb', line 125 def add_declaration(decl) case decl when RBS::AST::Declarations::Global declarations << decl else raise end self end |