Module: Ruby3BackwardCompatibility::PsychCompatibility::ClassMethods

Defined in:
lib/ruby3_backward_compatibility/compatibility/psych.rb

Instance Method Summary collapse

Instance Method Details

#safe_load(yaml, legacy_permitted_classes = NOT_GIVEN, legacy_permitted_symbols = NOT_GIVEN, legacy_aliases = NOT_GIVEN, legacy_filename = NOT_GIVEN, permitted_classes: [], permitted_symbols: [], aliases: false, filename: nil, **args) ⇒ Object



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/ruby3_backward_compatibility/compatibility/psych.rb', line 11

def safe_load(yaml, legacy_permitted_classes = NOT_GIVEN, legacy_permitted_symbols = NOT_GIVEN, legacy_aliases = NOT_GIVEN, legacy_filename = NOT_GIVEN, permitted_classes: [], permitted_symbols: [], aliases: false, filename: nil, **args)
  if legacy_permitted_classes != NOT_GIVEN
    permitted_classes = legacy_permitted_classes
  end
  if legacy_permitted_symbols != NOT_GIVEN
    permitted_symbols = legacy_permitted_symbols
  end
  if legacy_aliases != NOT_GIVEN
    aliases = legacy_aliases
  end
  if legacy_filename != NOT_GIVEN
    filename = legacy_filename
  end
  super(yaml, permitted_classes: permitted_classes, permitted_symbols: permitted_symbols, aliases: aliases, filename: filename, **args)
end