Class: Archaeo::Page
- Inherits:
-
Object
- Object
- Archaeo::Page
- Defined in:
- lib/archaeo/page.rb
Overview
Model representing a fetched archived page from the Wayback Machine.
Contains the page content, metadata, and provenance information for a single archived resource.
Instance Attribute Summary collapse
-
#archive_url ⇒ Object
readonly
Returns the value of attribute archive_url.
-
#content ⇒ Object
readonly
Returns the value of attribute content.
-
#content_type ⇒ Object
readonly
Returns the value of attribute content_type.
-
#original_url ⇒ Object
readonly
Returns the value of attribute original_url.
-
#status_code ⇒ Object
readonly
Returns the value of attribute status_code.
-
#timestamp ⇒ Object
readonly
Returns the value of attribute timestamp.
Instance Method Summary collapse
-
#initialize(content:, content_type:, status_code:, archive_url:, original_url:, timestamp:) ⇒ Page
constructor
A new instance of Page.
Constructor Details
#initialize(content:, content_type:, status_code:, archive_url:, original_url:, timestamp:) ⇒ Page
Returns a new instance of Page.
12 13 14 15 16 17 18 19 20 |
# File 'lib/archaeo/page.rb', line 12 def initialize(content:, content_type:, status_code:, archive_url:, original_url:, timestamp:) @content = content @content_type = content_type @status_code = status_code @archive_url = archive_url @original_url = original_url @timestamp = Timestamp.coerce() end |
Instance Attribute Details
#archive_url ⇒ Object (readonly)
Returns the value of attribute archive_url.
9 10 11 |
# File 'lib/archaeo/page.rb', line 9 def archive_url @archive_url end |
#content ⇒ Object (readonly)
Returns the value of attribute content.
9 10 11 |
# File 'lib/archaeo/page.rb', line 9 def content @content end |
#content_type ⇒ Object (readonly)
Returns the value of attribute content_type.
9 10 11 |
# File 'lib/archaeo/page.rb', line 9 def content_type @content_type end |
#original_url ⇒ Object (readonly)
Returns the value of attribute original_url.
9 10 11 |
# File 'lib/archaeo/page.rb', line 9 def original_url @original_url end |
#status_code ⇒ Object (readonly)
Returns the value of attribute status_code.
9 10 11 |
# File 'lib/archaeo/page.rb', line 9 def status_code @status_code end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
9 10 11 |
# File 'lib/archaeo/page.rb', line 9 def @timestamp end |