Class: Steep::AST::Types::Name::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/steep/ast/types/name.rb

Direct Known Subclasses

Applying, Class, Module

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, location: nil) ⇒ Base

Returns a new instance of Base.



9
10
11
12
# File 'lib/steep/ast/types/name.rb', line 9

def initialize(name:, location: nil)
  @location = location
  @name = name
end

Instance Attribute Details

#locationObject (readonly)

Returns the value of attribute location.



6
7
8
# File 'lib/steep/ast/types/name.rb', line 6

def location
  @location
end

#nameObject (readonly)

Returns the value of attribute name.



7
8
9
# File 'lib/steep/ast/types/name.rb', line 7

def name
  @name
end

Instance Method Details

#free_variablesObject



14
15
16
# File 'lib/steep/ast/types/name.rb', line 14

def free_variables
  Set.new
end

#levelObject



22
23
24
# File 'lib/steep/ast/types/name.rb', line 22

def level
  [0]
end

#subst(s) ⇒ Object



18
19
20
# File 'lib/steep/ast/types/name.rb', line 18

def subst(s)
  self
end