# File lib/v8/portal/interceptors.rb, line 49 def initialize(portal) @to, @access = portal, portal.access end
# File lib/v8/portal/interceptors.rb, line 53 def intercept(info, retval = nil, &code) obj = @to.rb(info.This()) intercepts = true result = @to.caller.protect do dontintercept = proc do intercepts = false end code.call(obj, dontintercept) end intercepts ? (retval || result) : C::Empty end