Class: TypeProf::Core::TypeReadBox

Inherits:
Box
  • Object
show all
Defined in:
lib/typeprof/core/graph/box.rb

Instance Attribute Summary collapse

Attributes inherited from Box

#changes, #destroyed

Instance Method Summary collapse

Methods inherited from Box

#destroy, #diagnostics, #on_type_added, #on_type_removed, #reuse, #run, #to_s

Constructor Details

#initialize(node, genv, rbs_type) ⇒ TypeReadBox

Returns a new instance of TypeReadBox.



80
81
82
83
84
85
# File 'lib/typeprof/core/graph/box.rb', line 80

def initialize(node, genv, rbs_type)
  super(node)
  @rbs_type = rbs_type
  @ret = Vertex.new(node)
  genv.add_run(self)
end

Instance Attribute Details

#nodeObject (readonly)

Returns the value of attribute node.



87
88
89
# File 'lib/typeprof/core/graph/box.rb', line 87

def node
  @node
end

#rbs_typeObject (readonly)

Returns the value of attribute rbs_type.



87
88
89
# File 'lib/typeprof/core/graph/box.rb', line 87

def rbs_type
  @rbs_type
end

#retObject (readonly)

Returns the value of attribute ret.



87
88
89
# File 'lib/typeprof/core/graph/box.rb', line 87

def ret
  @ret
end

Instance Method Details

#run0(genv, changes) ⇒ Object



89
90
91
92
# File 'lib/typeprof/core/graph/box.rb', line 89

def run0(genv, changes)
  vtx = @rbs_type.covariant_vertex(genv, changes, {})
  changes.add_edge(genv, vtx, @ret)
end