From: Marnen Laibow-Koser Date: 2009-11-11T04:50:26+09:00 Subject: Re: Create HTML files using RUBY Krithika San wrote: > I am told to create static HTML page and asked to write something like > what Marnen has quoted. External library and CGI script are also not > required to use. > So let me try what Marnen has mentioned. > > Could you tell me if I can do something like this > > file_html = File.new("sample.html", "w+") > file_html.puts "" > file_html.puts "
This is a color

" > file_html.puts "
This is > yellowww
" > file_html.puts "" > file_html.close() > system("start sample.html") > Why are you asking? In the time it took you to type that, you could have executed it and inspected the result. (BTW, your HTML code is of really poor quality.) > > Thanks, > Krithika > Best, -- Marnen Laibow-Koser http://www.marnen.org marnen@marnen.org -- Posted via http://www.ruby-forum.com/.