class TypeProf::Core::EscapeBox::HashSplatBox
Public Class Methods
Source
# File bundled-src/typeprof-0.31.1/lib/typeprof/core/graph/box.rb, line 367 def initialize(node, genv, hsh, unified_key, unified_val) super(node) @hsh = hsh @unified_key = unified_key @unified_val = unified_val @hsh.add_edge(genv, self) end
Calls superclass method
TypeProf::Core::Box::new
Public Instance Methods
Source
# File bundled-src/typeprof-0.31.1/lib/typeprof/core/graph/box.rb, line 375 def ret = @hsh # dummy attr_reader :hsh, :unified_key, :unified_val def run0(genv, changes) @hsh.each_type do |ty| ty = ty.base_type(genv) if ty.mod == genv.mod_hash changes.add_edge(genv, ty.args[0].new_vertex(genv, :__hash_splat), @unified_key) changes.add_edge(genv, ty.args[1].new_vertex(genv, :__hash_splat), @unified_val) else "???" end end end end
Source
# File bundled-src/typeprof-0.31.1/lib/typeprof/core/graph/box.rb, line 379 def run0(genv, changes) @hsh.each_type do |ty| ty = ty.base_type(genv) if ty.mod == genv.mod_hash changes.add_edge(genv, ty.args[0].new_vertex(genv, :__hash_splat), @unified_key) changes.add_edge(genv, ty.args[1].new_vertex(genv, :__hash_splat), @unified_val) else "???" end end end