Module: Versed::Reader
- Defined in:
- lib/versed/reader.rb
Class Method Summary collapse
-
.read(path) ⇒ Hash
Reads YAML from a file.
Class Method Details
.read(path) ⇒ Hash
Reads YAML from a file
9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/versed/reader.rb', line 9 def self.read(path) begin return YAML.load(IO.read(path)) rescue YAML::Error => e puts "Encountered an error reading YAML from #{path}" puts e. exit 1 rescue StandardError => e puts e. exit 1 end end |