puremvc-gen/lib/pure_m_v_c_gen/puremvcgen.rb

16 lines
370 B
Ruby
Raw Permalink Normal View History

class PureMVCGen
def PureMVCGen.filter(template_file, target_file, properties)
if File.exists?(template_file)
ofh = File.new(target_file, 'w')
File.readlines(tempalte_file).each do |line|
properties.each { |p,v| line.gsub!("@#{p}@", v) }
ofh.puts line
end
ofh.close
end
end
def PureMVCGen.read_properties
end
end