Class: Curation::Page

Inherits:
Object
  • Object
show all
Includes:
Image, Jsonld, Metainspector, Nokogiri, PublicationDate, Raw, Text, Title
Defined in:
lib/curation.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Text

#text

Methods included from PublicationDate

#date

Methods included from Image

#image

Methods included from Title

#title

Methods included from Nokogiri

#nokogiri

Methods included from Metainspector

#metainspector, #metatags

Methods included from Jsonld

#json_ld, #json_ld_from_object

Methods included from Raw

#file, #html

Constructor Details

#initialize(url, html = nil) ⇒ Page

Returns a new instance of Page.



34
35
36
37
38
# File 'lib/curation.rb', line 34

def initialize(url, html = nil)
  @url = url.to_s.gsub('http://', 'https://')
  @html = html
  @verbose = false
end

Instance Attribute Details

#urlObject (readonly)

Returns the value of attribute url.



31
32
33
# File 'lib/curation.rb', line 31

def url
  @url
end

#verboseObject

Returns the value of attribute verbose.



32
33
34
# File 'lib/curation.rb', line 32

def verbose
  @verbose
end