Class: TypedRb::Model::TmSymbolInterpolation

Inherits:
Expr
  • Object
show all
Defined in:
lib/typed/model/tm_symbol_interpolation.rb

Overview

Symbol interpolation

Instance Attribute Summary collapse

Attributes inherited from Expr

#col, #line, #node, #type

Instance Method Summary collapse

Constructor Details

#initialize(units, node) ⇒ TmSymbolInterpolation

Returns a new instance of TmSymbolInterpolation.



8
9
10
11
# File 'lib/typed/model/tm_symbol_interpolation.rb', line 8

def initialize(units, node)
  super(node)
  @units = units
end

Instance Attribute Details

#unitsObject (readonly)

Returns the value of attribute units.



7
8
9
# File 'lib/typed/model/tm_symbol_interpolation.rb', line 7

def units
  @units
end

Instance Method Details

#check_type(context) ⇒ Object



13
14
15
16
17
18
# File 'lib/typed/model/tm_symbol_interpolation.rb', line 13

def check_type(context)
  units.each do |unit|
    unit.check_type(context)
  end
  Types::TySymbol.new(node)
end