Sha256: e3d6bb4e33af69ab715790620dbf0c775bcdc521fb96314ea1bff8dee40d4553

Contents?: true

Size: 572 Bytes

Versions: 4

Compression:

Stored size: 572 Bytes

Contents

# =========================================================================
#   Unity - A Test Framework for C
#   ThrowTheSwitch.org
#   Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
#   SPDX-License-Identifier: MIT
# =========================================================================

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

Version data entries

4 entries across 2 versions & 1 rubygems

Version Path
ceedling-1.0.1 vendor/cmock/vendor/unity/auto/yaml_helper.rb
ceedling-1.0.1 vendor/unity/auto/yaml_helper.rb
ceedling-1.0.0 vendor/cmock/vendor/unity/auto/yaml_helper.rb
ceedling-1.0.0 vendor/unity/auto/yaml_helper.rb