Module: Nokogiri

Included in:
Curation::Page
Defined in:
lib/curation/tools/nokogiri.rb

Instance Method Summary collapse

Instance Method Details

#nokogiriObject



3
4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/curation/tools/nokogiri.rb', line 3

def nokogiri
  unless @nokogiri
    if file.nil?
      @nokogiri = metainspector.parsed
    else
      file.rewind
      @nokogiri = Nokogiri::HTML file
      file.rewind
    end
  end
  @nokogiri
rescue
  log 'Curation::Page nokogiri error'
end