I would like to capture the entire contents of a file in to a string (a
la Perl) - is this the best way to do it?
File.open(@document.path, r) do |f|
@lines = f.readlines
html = @lines.join
so that the html variable has all of the contents of f.
Is there a better/easier way?