1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-28 07:03:00 +08:00
lvgl/tests/unity/yaml_helper.rb
Liu Yi 228bf2007e
feat(unity): update unity to version 2.6.0 (#6453)
Signed-off-by: lhdjply <lhdjply@126.com>
2024-07-31 14:14:54 +08:00

23 lines
531 B
Ruby

# ==========================================
# Unity Project - A Test Framework for C
# Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams
# [Released under MIT License. Please refer to license.txt for details]
# ==========================================
require 'yaml'
module YamlHelper
def self.load(body)
if YAML.respond_to?(:unsafe_load)
YAML.unsafe_load(body)
else
YAML.load(body)
end
end
def self.load_file(file)
body = File.read(file)
self.load(body)
end
end