hostsgen.rb
# raise a string contains filename, reason
# return Hosts data
raise a string contains filename, reason
return Hosts data
raise a string contains filename reason return Hosts data
def compile(m, f)
    print @file + '..' if not ARGV.include? '-q'
    inf = File.open(m + '/' + @file)
    content = inf.read
    hosts = Hosts.new
    hosts.parse content
    hosts.logs.each_with_index do |l, i|
      hosts.logs[i] = @genrule.process l
    end
    f.puts "#FILE: " + @file + " : " + @desc + "\n" if not ARGV.include? '-t'
    f.puts hosts
    return hosts.logs.length
    f.puts "#FILE: " + @file + "\n" if not ARGV.include? '-t'
  end
def compile ( m , f ) print @file + '..' if not ARGV . include? '-q' inf = File . open ( m + '/' + @file ) content = inf . read hosts = Hosts . new hosts . parse content hosts . logs . each_with_index do | l , i | hosts . logs [ i ] = @genrule . process l end f . puts "#FILE: " + @file + " : " + @desc + "\n" if not ARGV . include? '-t' f . puts hosts return hosts . logs . length f . puts "#FILE: " + @file + "\n" if not ARGV . include? '-t' end
raise a string contains filename, reason
return Hosts data
raise a string contains filename reason return Hosts data
m
f