# Author:: Nicolas Pouillard . # Copyright:: Copyright (c) 2004 LRDE. All rights reserved. # License:: GNU General Public License (GPL). # $LastChangedBy: ertai $ # $Id: header 98 2004-09-29 12:07:43Z ertai $ require 'yaml' module YAML def self.chop_header ( io ) aStr = io.gets raise Exception, "First line is not valid: `#{aLine}'" unless aStr =~ /^---/ io.each do |aLine| break if aLine =~ /^---/ aStr += aLine end YAML::load(aStr) end end # module YAML