Class: SFRP::Poly::TypeAnnotationVar

Inherits:
Object
  • Object
show all
Defined in:
lib/sfrp/poly/typing.rb

Instance Method Summary collapse

Constructor Details

#initialize(var_str) ⇒ TypeAnnotationVar

Returns a new instance of TypeAnnotationVar.



179
180
181
# File 'lib/sfrp/poly/typing.rb', line 179

def initialize(var_str)
  @var_str = var_str
end

Instance Method Details

#to_sObject



192
193
194
# File 'lib/sfrp/poly/typing.rb', line 192

def to_s
  @var_str
end

#to_typing(tbl) ⇒ Object



183
184
185
186
# File 'lib/sfrp/poly/typing.rb', line 183

def to_typing(tbl)
  raise var_str unless tbl.key?(@var_str)
  tbl[@var_str]
end

#var_strsObject



188
189
190
# File 'lib/sfrp/poly/typing.rb', line 188

def var_strs
  [@var_str]
end