class Psych::ClassLoader::Restricted - Documentation for Ruby 4.0
Description: Documentation for the Psych::ClassLoader::Restricted class
Keywords: ruby,class,Psych::ClassLoader::Restricted

🔍

No recent searches

# class Psych::ClassLoader::Restricted

### Public Class Methods

new (classes, symbols)
Source

    # File ext/psych/lib/psych/class_loader.rb, line 78
    def initialize classes, symbols
      @classes = classes
      @symbols = symbols
      super()
    end

Calls superclass method `BasicObject::new`

### Public Instance Methods

symbolize (sym)
Source

    # File ext/psych/lib/psych/class_loader.rb, line 84
    def symbolize sym
      return super if @symbols.empty?

      if @symbols.include? sym
        super
      else
        raise DisallowedClass.new('load', 'Symbol')
      end
    end

Calls superclass method

### Private Instance Methods

find (klassname)
Source

    # File ext/psych/lib/psych/class_loader.rb, line 96
    def find klassname
      if @classes.include? klassname
        super
      else
        raise DisallowedClass.new('load', klassname)
      end
    end

Calls superclass method