class TypedRb::Model::Expr
Attributes
col[R]
line[R]
node[R]
type[R]
Public Class Methods
new(node, type = nil)
click to toggle source
# File lib/typed/model.rb, line 35 def initialize(node, type = nil) @node = node @line = node.location.line @col = node.location.column @type = type end
Public Instance Methods
check_type(_context)
click to toggle source
# File lib/typed/model.rb, line 42 def check_type(_context) fail TypeCheckError.new('Type error: Unknown type', node) if @type.nil? @type end