Class: WaybackArchiver::ArchiveResult
- Inherits:
-
Object
- Object
- WaybackArchiver::ArchiveResult
- Defined in:
- lib/wayback_archiver/archive_result.rb
Overview
Result data for posting URL to archive
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#error ⇒ Object
readonly
Returns the value of attribute error.
-
#request_url ⇒ Object
readonly
Returns the value of attribute request_url.
-
#response_error ⇒ Object
readonly
Returns the value of attribute response_error.
-
#uri ⇒ Object
readonly
Returns the value of attribute uri.
Instance Method Summary collapse
-
#archived_url ⇒ String
The URL that was archived.
-
#errored? ⇒ Boolean
True if errored.
-
#initialize(uri, code: nil, request_url: nil, response_error: nil, error: nil) ⇒ ArchiveResult
constructor
A new instance of ArchiveResult.
-
#success? ⇒ Boolean
True if success.
Constructor Details
#initialize(uri, code: nil, request_url: nil, response_error: nil, error: nil) ⇒ ArchiveResult
Returns a new instance of ArchiveResult.
6 7 8 9 10 11 12 |
# File 'lib/wayback_archiver/archive_result.rb', line 6 def initialize(uri, code: nil, request_url: nil, response_error: nil, error: nil) @uri = uri @code = code @request_url = request_url @response_error = response_error @error = error end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
4 5 6 |
# File 'lib/wayback_archiver/archive_result.rb', line 4 def code @code end |
#error ⇒ Object (readonly)
Returns the value of attribute error.
4 5 6 |
# File 'lib/wayback_archiver/archive_result.rb', line 4 def error @error end |
#request_url ⇒ Object (readonly)
Returns the value of attribute request_url.
4 5 6 |
# File 'lib/wayback_archiver/archive_result.rb', line 4 def request_url @request_url end |
#response_error ⇒ Object (readonly)
Returns the value of attribute response_error.
4 5 6 |
# File 'lib/wayback_archiver/archive_result.rb', line 4 def response_error @response_error end |
#uri ⇒ Object (readonly)
Returns the value of attribute uri.
4 5 6 |
# File 'lib/wayback_archiver/archive_result.rb', line 4 def uri @uri end |
Instance Method Details
#archived_url ⇒ String
Returns the URL that was archived.
15 16 17 |
# File 'lib/wayback_archiver/archive_result.rb', line 15 def archived_url uri end |
#errored? ⇒ Boolean
Returns true if errored.
25 26 27 |
# File 'lib/wayback_archiver/archive_result.rb', line 25 def errored? !!error end |
#success? ⇒ Boolean
Returns true if success.
20 21 22 |
# File 'lib/wayback_archiver/archive_result.rb', line 20 def success? !errored? end |