Class: Psych::ClassLoader::Restricted
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
::Psych::ClassLoader
|
|
Instance Chain:
self,
::Psych::ClassLoader
|
|
Inherits: |
Psych::ClassLoader
|
Defined in: | ext/psych/lib/psych/class_loader.rb |
Constant Summary
::Psych::ClassLoader
- Inherited
BIG_DECIMAL, CACHE, COMPLEX, DATE, DATE_TIME, EXCEPTION, OBJECT, PSYCH_OMAP, PSYCH_SET, RANGE, RATIONAL, REGEXP, STRUCT, SYMBOL
Class Method Summary
Instance Method Summary
- #symbolize(sym)
- #find(klassname) private
::Psych::ClassLoader
- Inherited
#path2class | Convert |
#load, #symbolize, #find, #resolve |
Constructor Details
.new(classes, symbols) ⇒ Restricted
# File 'ext/psych/lib/psych/class_loader.rb', line 77
def initialize classes, symbols @classes = classes @symbols = symbols super() end
Instance Method Details
#find(klassname) (private)
[ GitHub ]# File 'ext/psych/lib/psych/class_loader.rb', line 95
def find klassname if @classes.include? klassname super else raise DisallowedClass.new('load', klassname) end end
#symbolize(sym)
[ GitHub ]# File 'ext/psych/lib/psych/class_loader.rb', line 83
def symbolize sym return super if @symbols.empty? if @symbols.include? sym super else raise DisallowedClass.new('load', 'Symbol') end end