I use a hash to store the little data needed to analyze the website, including the URL, and specific instructions for using Nokogiri to analyze website headers. However, I interpreted the nested Hash as an array.
webSite = { :everdoH =>
{ :url => "http://www.everardoherrera.com/" ,
:instruc=> Proc.new PageToParse.css('.contentheading').css('.contentpagetitle')}
}
If I do this:
puts webSite.class
webSite.each {|aSite| puts aSite.class }
I get the following:
>> Hash
>> Array
Therefore, I cannot use any of the hash indexing properties.
Any idea why I am not getting a Hash class type on the nested part?
source
share