From: peteV Date: 2013-04-30T03:46:37+09:00 Subject: Re: writing lines to a file This is a multi-part message in MIME format. --------------090903040409060108080003 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 04/29/2013 02:27 PM, Joel Pearson wrote: > File.foreach(cardList) do|line| > parse= Card.new( *Array.new( 4, line.to_s ) ) > File.open('foozled.txt','a') {|f| f.puts parse.to_s } > end no, it gives the same output nil's to the file, prints good to screen --------------090903040409060108080003 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit
On 04/29/2013 02:27 PM, Joel Pearson wrote:
File.foreach(cardList) do |line|
  parse= Card.new( *Array.new( 4, line.to_s ) )
  File.open('foozled.txt','a') { |f| f.puts parse.to_s }
end
no, it gives the same output nil's to the file, prints good to screen
--------------090903040409060108080003--