Class: Archaeo::AvailabilityResult
- Inherits:
-
Object
- Object
- Archaeo::AvailabilityResult
- Defined in:
- lib/archaeo/availability_result.rb
Overview
Model representing the result of an availability query.
Indicates whether a URL is archived and, if so, provides the closest snapshot’s archive URL and timestamp.
Instance Attribute Summary collapse
-
#archive_url ⇒ Object
readonly
Returns the value of attribute archive_url.
-
#timestamp ⇒ Object
readonly
Returns the value of attribute timestamp.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
- #available? ⇒ Boolean
-
#initialize(url:, available:, archive_url: nil, timestamp: nil) ⇒ AvailabilityResult
constructor
A new instance of AvailabilityResult.
Constructor Details
#initialize(url:, available:, archive_url: nil, timestamp: nil) ⇒ AvailabilityResult
Returns a new instance of AvailabilityResult.
11 12 13 14 15 16 |
# File 'lib/archaeo/availability_result.rb', line 11 def initialize(url:, available:, archive_url: nil, timestamp: nil) @url = url @available = available @archive_url = archive_url @timestamp = end |
Instance Attribute Details
#archive_url ⇒ Object (readonly)
Returns the value of attribute archive_url.
9 10 11 |
# File 'lib/archaeo/availability_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/availability_result.rb', line 9 def @timestamp end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
9 10 11 |
# File 'lib/archaeo/availability_result.rb', line 9 def url @url end |
Instance Method Details
#available? ⇒ Boolean
18 19 20 |
# File 'lib/archaeo/availability_result.rb', line 18 def available? @available end |