lib/wmap.rb
# Simple parser for the project version file
Simple parser for the project version file
Simple parser for the project version file
def read_ver
		ver=Hash.new
		f=File.open(VERSION,'r')
		f.each do |line|
			line.chomp!
			case line
			when /^(\s)*#/
				next
			when /\=/
				entry=line.split("=").map! {|x| x.strip}
				ver[entry[0]]=entry[1]
			end
		end
		f.close
		return ver
	end
def read_ver ver = Hash . new f = File . open ( VERSION , 'r' ) f . each do | line | line . chomp! case line when / ^( \s )*# / next when / \= / entry = line . split ( "=" ) . map! { | x | x . strip } ver [ entry [ 0 ] ] = entry [ 1 ] end end f . close return ver end
Simple parser for the project version file
Simple parser for the project version file