Class: Jets::Util::Yamler
- Inherits:
-
Object
- Object
- Jets::Util::Yamler
- Defined in:
- lib/jets/util/yamler.rb
Class Method Summary collapse
Class Method Details
.load(text) ⇒ Object
5 6 7 8 |
# File 'lib/jets/util/yamler.rb', line 5 def load(text) = RUBY_VERSION =~ /^3/ ? {aliases: true} : {} # Ruby 3.0.0 deprecates aliases: true YAML.load(text, **) end |
.load_file(path) ⇒ Object
10 11 12 13 |
# File 'lib/jets/util/yamler.rb', line 10 def load_file(path) = RUBY_VERSION =~ /^3/ ? {aliases: true} : {} # Ruby 3.0.0 deprecates aliases: true YAML.load_file(path, **) end |