Class: TypeProf::Core::TypeReadBox
- Defined in:
- lib/typeprof/core/graph/box.rb
Instance Attribute Summary collapse
-
#node ⇒ Object
readonly
Returns the value of attribute node.
-
#rbs_type ⇒ Object
readonly
Returns the value of attribute rbs_type.
-
#ret ⇒ Object
readonly
Returns the value of attribute ret.
Attributes inherited from Box
Instance Method Summary collapse
-
#initialize(node, genv, rbs_type) ⇒ TypeReadBox
constructor
A new instance of TypeReadBox.
- #run0(genv, changes) ⇒ Object
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
#node ⇒ Object (readonly)
Returns the value of attribute node.
87 88 89 |
# File 'lib/typeprof/core/graph/box.rb', line 87 def node @node end |
#rbs_type ⇒ Object (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 |
#ret ⇒ Object (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 |