Module: Metainspector

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

Instance Method Summary collapse

Instance Method Details

#metainspectorObject



3
4
5
6
7
8
9
10
11
# File 'lib/curation/tools/metainspector.rb', line 3

def metainspector
  unless @metainspector
    @metainspector = html.nil?  ? MetaInspector.new(url)
                                : MetaInspector.new(url, document: html)
  end
  @metainspector
rescue
  log 'Curation::Page metainspector error'
end

#metatagsObject



13
14
15
16
17
# File 'lib/curation/tools/metainspector.rb', line 13

def metatags
  @metatags ||= metainspector.meta_tag['name']
rescue
  log 'Curation::Page metatags error'
end