Class: RBS::Environment::SingleEntry

Inherits:
Object
  • Object
show all
Defined in:
sig/environment.rbs,
lib/rbs/environment.rb

Overview

Name of object, it's (single) declaration, and the outer module declarations

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of SingleEntry.

Parameters:

  • name: (N)
  • decl: (D)
  • context: (Resolver::context)


23
24
25
26
27
# File 'lib/rbs/environment.rb', line 23

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

Instance Attribute Details

#contextResolver::context (readonly)

Returns the value of attribute context.

Returns:

  • (Resolver::context)


20
21
22
# File 'lib/rbs/environment.rb', line 20

def context
  @context
end

#declD (readonly)

Returns the value of attribute decl.

Returns:

  • (D)


21
22
23
# File 'lib/rbs/environment.rb', line 21

def decl
  @decl
end

#nameN (readonly)

Returns the value of attribute name.

Returns:

  • (N)


19
20
21
# File 'lib/rbs/environment.rb', line 19

def name
  @name
end