module FlightConfig::Patches::TTYConfig::PatchedYAML
Public Class Methods
method_missing(s, *a, **h, &b)
click to toggle source
Delegate missing methods to Psych
Calls superclass method
# File lib/flight_config/patches/tty_config.rb, line 60 def self.method_missing(s, *a, **h, &b) if respond_to_missing?(s) == :psych_method Psych.public_send(s, *a, **h, &b) else super end end
respond_to_missing?(s)
click to toggle source
Check if the missing method is defined on Psych
Calls superclass method
# File lib/flight_config/patches/tty_config.rb, line 71 def self.respond_to_missing?(s) return :psych_method if Psych.respond_to?(s) super end
safe_load(yaml, whitelist_classes = [], whitelist_symbols = [], _aliases = false, filename = nil)
click to toggle source
Overload `safe_load` to always allow aliases
# File lib/flight_config/patches/tty_config.rb, line 44 def self.safe_load(yaml, whitelist_classes = [], whitelist_symbols = [], _aliases = false, filename = nil) Psych.safe_load(yaml, whitelist_classes, whitelist_symbols, true, filename) end