Class: TypedRb::Model::TmGlobalVar
- Defined in:
- lib/typed/model/tm_global_var.rb
Overview
instance variable
Instance Attribute Summary collapse
-
#val ⇒ Object
Returns the value of attribute val.
Attributes inherited from Expr
Instance Method Summary collapse
- #check_type(_context) ⇒ Object
-
#initialize(val, node) ⇒ TmGlobalVar
constructor
A new instance of TmGlobalVar.
Constructor Details
#initialize(val, node) ⇒ TmGlobalVar
Returns a new instance of TmGlobalVar.
10 11 12 13 |
# File 'lib/typed/model/tm_global_var.rb', line 10 def initialize(val, node) super(node) @val = val end |
Instance Attribute Details
#val ⇒ Object
Returns the value of attribute val.
8 9 10 |
# File 'lib/typed/model/tm_global_var.rb', line 8 def val @val end |
Instance Method Details
#check_type(_context) ⇒ Object
15 16 17 18 19 |
# File 'lib/typed/model/tm_global_var.rb', line 15 def check_type(_context) type = Types::TypingContext.type_variable_for_global(val) type.node = node type end |