Support for the Ruby 2.1 series ended on March 31 2017. See here for details.

In Files

  • psych/lib/psych/class_loader.rb

Psych::ClassLoader::Restricted

Public Class Methods

new(classes, symbols) click to toggle source
 
               # File psych/lib/psych/class_loader.rb, line 74
def initialize classes, symbols
  @classes = classes
  @symbols = symbols
  super()
end
            

Public Instance Methods

symbolize(sym) click to toggle source
 
               # File psych/lib/psych/class_loader.rb, line 80
def symbolize sym
  return super if @symbols.empty?

  if @symbols.include? sym
    super
  else
    raise DisallowedClass, 'Symbol'
  end
end