Class: RBS::Environment::SingleEntry

Inherits:
Object
  • Object
show all
Includes:
ContextUtil
Defined in:
lib/rbs/environment.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from ContextUtil

#calculate_context

Constructor Details

#initialize(name:, decl:, outer:) ⇒ SingleEntry

Returns a new instance of SingleEntry.



111
112
113
114
115
# File 'lib/rbs/environment.rb', line 111

def initialize(name:, decl:, outer:)
  @name = name
  @decl = decl
  @outer = outer
end

Instance Attribute Details

#declObject (readonly)

Returns the value of attribute decl.



109
110
111
# File 'lib/rbs/environment.rb', line 109

def decl
  @decl
end

#nameObject (readonly)

Returns the value of attribute name.



107
108
109
# File 'lib/rbs/environment.rb', line 107

def name
  @name
end

#outerObject (readonly)

Returns the value of attribute outer.



108
109
110
# File 'lib/rbs/environment.rb', line 108

def outer
  @outer
end

Instance Method Details

#contextObject



119
120
121
# File 'lib/rbs/environment.rb', line 119

def context
  @context = calculate_context(outer)
end