Module: Contrast::Utils::ResourceLoader
- Defined in:
- lib/contrast/utils/resource_loader.rb
Overview
ResourceLoader can attempt to read a file from a predefined resource directory
Constant Summary collapse
- RESOURCES =
'resources'
- RESOURCE_ROOT =
__FILE__/../../../resources
File.join( File.dirname(__FILE__), Contrast::Utils::ObjectShare::PARENT_PATH, Contrast::Utils::ObjectShare::PARENT_PATH, Contrast::Utils::ObjectShare::PARENT_PATH, RESOURCES).cs__freeze
Class Method Summary collapse
Class Method Details
.load(resource) ⇒ Object
18 19 20 |
# File 'lib/contrast/utils/resource_loader.rb', line 18 def self.load resource File.read(File.join(RESOURCE_ROOT, resource)) end |