Class: SFRP::Poly::TypeAnnotationVar
- Inherits:
-
Object
- Object
- SFRP::Poly::TypeAnnotationVar
- Defined in:
- lib/sfrp/poly/typing.rb
Instance Method Summary collapse
-
#initialize(var_str) ⇒ TypeAnnotationVar
constructor
A new instance of TypeAnnotationVar.
- #to_s ⇒ Object
- #to_typing(tbl) ⇒ Object
- #var_strs ⇒ Object
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_s ⇒ Object
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_strs ⇒ Object
188 189 190 |
# File 'lib/sfrp/poly/typing.rb', line 188 def var_strs [@var_str] end |