# File lib/g5kchecks/utils/configparser.rb, line 7 def initialize(configpath) # The config path @path = configpath # Hash to be return after the file parsing @hash = {} end
# File lib/g5kchecks/utils/configparser.rb, line 14 def parse begin @hash = YAML.load_file(@path) rescue ArgumentError raise ArgumentError.new("Invalid YAML file '#{@path}'") rescue Errno::ENOENT raise ArgumentError.new("File not found '#{@path}'") end return @hash end