Class: Archaeo::SaveResult
- Inherits:
-
Object
- Object
- Archaeo::SaveResult
- Defined in:
- lib/archaeo/save_result.rb
Overview
Model representing the outcome of a SavePageNow request.
Contains the resulting archive URL, timestamp, and whether the page was already cached in the archive.
Instance Attribute Summary collapse
-
#archive_url ⇒ Object
readonly
Returns the value of attribute archive_url.
-
#timestamp ⇒ Object
readonly
Returns the value of attribute timestamp.
Instance Method Summary collapse
- #cached? ⇒ Boolean
-
#initialize(archive_url:, timestamp:, cached:) ⇒ SaveResult
constructor
A new instance of SaveResult.
Constructor Details
#initialize(archive_url:, timestamp:, cached:) ⇒ SaveResult
Returns a new instance of SaveResult.
11 12 13 14 15 |
# File 'lib/archaeo/save_result.rb', line 11 def initialize(archive_url:, timestamp:, cached:) @archive_url = archive_url @timestamp = Timestamp.coerce() @cached = cached end |
Instance Attribute Details
#archive_url ⇒ Object (readonly)
Returns the value of attribute archive_url.
9 10 11 |
# File 'lib/archaeo/save_result.rb', line 9 def archive_url @archive_url end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
9 10 11 |
# File 'lib/archaeo/save_result.rb', line 9 def @timestamp end |
Instance Method Details
#cached? ⇒ Boolean
17 18 19 |
# File 'lib/archaeo/save_result.rb', line 17 def cached? @cached end |