D
Don Norcott
I am very new to ruby (but a retired experienced C programmer) and am
getting buried in the amount of documentation available. Have been
unable to find an answer to this question, but perhaps do not understand
the concepts involved enough to search correctly. Given this code
require 'hpricot'
url = "http://www....."
doc = Hpricot.XML(open(url))
In interactive ruby can I suppress the output produced by
Hpricot.XML(open(url))
is this the stdout stream or is it something else? At completion the
HTML is in the doc object so is there any need for it to also be
displayed. Perhaps the object has a means of suppressing the data being
loaded?
I am working with web pages and a very large amount of data is involved.
When I mark and copy the irb window to a file to do searches on the data
I have a lot of unneeded and duplicated data. Perhaps there are IRB
parameters to resolve this
I know I can redirect to a file then use the file (but still have same
problem when opening file for processing), but what I would like to do
is the equivalent of redirecting stdout (if it is stdout) to NULL on a
per line basis.
Thanks RustySam
getting buried in the amount of documentation available. Have been
unable to find an answer to this question, but perhaps do not understand
the concepts involved enough to search correctly. Given this code
require 'hpricot'
url = "http://www....."
doc = Hpricot.XML(open(url))
In interactive ruby can I suppress the output produced by
Hpricot.XML(open(url))
is this the stdout stream or is it something else? At completion the
HTML is in the doc object so is there any need for it to also be
displayed. Perhaps the object has a means of suppressing the data being
loaded?
I am working with web pages and a very large amount of data is involved.
When I mark and copy the irb window to a file to do searches on the data
I have a lot of unneeded and duplicated data. Perhaps there are IRB
parameters to resolve this
I know I can redirect to a file then use the file (but still have same
problem when opening file for processing), but what I would like to do
is the equivalent of redirecting stdout (if it is stdout) to NULL on a
per line basis.
Thanks RustySam