Class: RBS::Environment::SingleEntry
- Inherits:
-
Object
- Object
- RBS::Environment::SingleEntry
- Includes:
- ContextUtil
- Defined in:
- lib/rbs/environment.rb
Direct Known Subclasses
ClassAliasEntry, ConstantEntry, GlobalEntry, InterfaceEntry, ModuleAliasEntry, TypeAliasEntry
Instance Attribute Summary collapse
-
#decl ⇒ Object
readonly
Returns the value of attribute decl.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#outer ⇒ Object
readonly
Returns the value of attribute outer.
Instance Method Summary collapse
- #context ⇒ Object
-
#initialize(name:, decl:, outer:) ⇒ SingleEntry
constructor
A new instance of SingleEntry.
Methods included from ContextUtil
Constructor Details
#initialize(name:, decl:, outer:) ⇒ SingleEntry
Returns a new instance of SingleEntry.
114 115 116 117 118 |
# File 'lib/rbs/environment.rb', line 114 def initialize(name:, decl:, outer:) @name = name @decl = decl @outer = outer end |
Instance Attribute Details
#decl ⇒ Object (readonly)
Returns the value of attribute decl.
112 113 114 |
# File 'lib/rbs/environment.rb', line 112 def decl @decl end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
110 111 112 |
# File 'lib/rbs/environment.rb', line 110 def name @name end |
#outer ⇒ Object (readonly)
Returns the value of attribute outer.
111 112 113 |
# File 'lib/rbs/environment.rb', line 111 def outer @outer end |
Instance Method Details
#context ⇒ Object
122 123 124 |
# File 'lib/rbs/environment.rb', line 122 def context @context ||= calculate_context(outer) end |