Class: Psych::ClassLoader::Restricted (Ruby 2.7.3)
Description: Class : Psych::ClassLoader::Restricted - Ruby 2.7.3

### Home Classes Methods

### In Files

- psych/lib/psych/class_loader.rb

### Parent

Psych::ClassLoader

### Methods

- ::new
- #symbolize

### Class/Module Index

Quicksearch

- Kernel
- Object
- Psych
- Psych::BadAlias
- Psych::ClassLoader
- Psych::ClassLoader::Restricted
- Psych::Coder
- Psych::DisallowedClass
- Psych::Emitter
- Psych::Exception
- Psych::Handler
- Psych::Handler::DumperOptions
- Psych::Handlers
- Psych::Handlers::Recorder
- Psych::JSON
- Psych::JSON::Stream
- Psych::JSON::TreeBuilder
- Psych::Nodes
- Psych::Nodes::Alias
- Psych::Nodes::Document
- Psych::Nodes::Mapping
- Psych::Nodes::Node
- Psych::Nodes::Scalar
- Psych::Nodes::Sequence
- Psych::Nodes::Stream
- Psych::Omap
- Psych::Parser
- Psych::Parser::Mark
- Psych::ScalarScanner
- Psych::Set
- Psych::Stream
- Psych::Streaming
- Psych::Streaming::ClassMethods
- Psych::SyntaxError
- Psych::TreeBuilder
- Psych::Visitors
- Psych::Visitors::DepthFirst
- Psych::Visitors::Emitter
- Psych::Visitors::JSONTree
- Psych::Visitors::NoAliasRuby
- Psych::Visitors::ToRuby
- Psych::Visitors::Visitor
- Psych::Visitors::YAMLTree
- Regexp

No matching classes.

# Psych::ClassLoader::Restricted

### Public Class Methods

new(classes, symbols) click to toggle source

                   # File psych/lib/psych/class_loader.rb, line 75
    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 81
    def symbolize sym
      return super if @symbols.empty?

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