Sha256: 4442394f81ffa1c51828f4bdf505aa638249a2f740a1cf72b3ea1aa14d211461
Contents?: true
Size: 729 Bytes
Versions: 20
Compression:
Stored size: 729 Bytes
Contents
# Copyright (c) 2020 Contrast Security, Inc. See https://www.contrastsecurity.com/enduser-terms-0317a for more details. # frozen_string_literal: true module Contrast module Utils # ResourceLoader can attempt to read a file from a predefined resource directory class ResourceLoader RESOURCES = 'resources' # __FILE__/../../../resources RESOURCE_ROOT = File.join( File.dirname(__FILE__), Contrast::Utils::ObjectShare::PARENT_PATH, Contrast::Utils::ObjectShare::PARENT_PATH, Contrast::Utils::ObjectShare::PARENT_PATH, RESOURCES).cs__freeze def self.load resource File.read(File.join(RESOURCE_ROOT, resource)) end end end end
Version data entries
20 entries across 20 versions & 1 rubygems