Sha256: 3f22018abf3eb02c135068d7e56db34dfa6b409e8163515d23cb4c1f3a926c6e
Contents?: true
Size: 746 Bytes
Versions: 5
Compression:
Stored size: 746 Bytes
Contents
require 'conjur-asset-dsl2' module Conjur module DSL2 module YAML class Loader class << self def load yaml, filename = nil parser = Psych::Parser.new(handler = Handler.new) handler.filename = filename handler.parser = parser begin parser.parse(yaml) rescue handler.log { $!.message } handler.log { $!.backtrace.join(" \n") } raise Invalid.new($!.message || "(no message)", filename, parser.mark) end handler.result end def load_file filename load File.read(filename), filename end end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems