class AppConfig def initialize() @values={} file=File.open("config.properties","r") file.each_line{|line| line.gsub!(/#.*/,"") k,v=line.split("=") if k and v @values[k]=v end } file.close end def [](name) @values[name] end end