class Gem::SafeMarshal::Visitors::ToRuby
Public Class Methods
new
(permitted_classes:, permitted_symbols:, permitted_ivars:)
# File lib/rubygems/safe_marshal/visitors/to_ruby.rb, line 8 def initialize(permitted_classes:, permitted_symbols:, permitted_ivars:) @permitted_classes = permitted_classes @permitted_symbols = ["E"].concat(permitted_symbols).concat(permitted_classes) @permitted_ivars = permitted_ivars @objects = [] @symbols = [] @class_cache = {} @stack = ["root"] @stack_idx = 1 end
Public Instance Methods
visit
(target)
Calls superclass method
# File lib/rubygems/safe_marshal/visitors/to_ruby.rb, line 26 def visit(target) stack_idx = @stack_idx super ensure @stack_idx = stack_idx - 1 end