class TypeProf::Core::Narrowing::IsAConstraint
Attributes
Public Class Methods
Source
# File bundled-src/typeprof-0.31.1/lib/typeprof/core/env/narrowing.rb, line 40 def initialize(arg, neg) @arg = arg @neg = neg end
Public Instance Methods
Source
# File bundled-src/typeprof-0.31.1/lib/typeprof/core/env/narrowing.rb, line 51 def inspect @neg ? "!#{@arg}" : "#{@arg}" end
Source
# File bundled-src/typeprof-0.31.1/lib/typeprof/core/env/narrowing.rb, line 55 def narrow(genv, node, vtx) if @arg.static_ret IsAFilter.new(genv, node, vtx, @neg, @arg.static_ret).next_vtx else vtx end end
Source
# File bundled-src/typeprof-0.31.1/lib/typeprof/core/env/narrowing.rb, line 47 def negate IsAConstraint.new(@arg, !@neg) end