Class: Archaeo::ContentChangeReport
- Inherits:
-
Struct
- Object
- Struct
- Archaeo::ContentChangeReport
- Defined in:
- lib/archaeo/content_tracker.rb
Overview
Value object summarizing content changes for a URL over a time range.
Instance Attribute Summary collapse
-
#changed_urls ⇒ Object
Returns the value of attribute changed_urls.
-
#content_frequency ⇒ Object
Returns the value of attribute content_frequency.
-
#from ⇒ Object
Returns the value of attribute from.
-
#new_urls ⇒ Object
Returns the value of attribute new_urls.
-
#removed_urls ⇒ Object
Returns the value of attribute removed_urls.
-
#to ⇒ Object
Returns the value of attribute to.
-
#total_snapshots ⇒ Object
Returns the value of attribute total_snapshots.
-
#unique_digests ⇒ Object
Returns the value of attribute unique_digests.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
Instance Attribute Details
#changed_urls ⇒ Object
Returns the value of attribute changed_urls
8 9 10 |
# File 'lib/archaeo/content_tracker.rb', line 8 def changed_urls @changed_urls end |
#content_frequency ⇒ Object
Returns the value of attribute content_frequency
8 9 10 |
# File 'lib/archaeo/content_tracker.rb', line 8 def content_frequency @content_frequency end |
#from ⇒ Object
Returns the value of attribute from
8 9 10 |
# File 'lib/archaeo/content_tracker.rb', line 8 def from @from end |
#new_urls ⇒ Object
Returns the value of attribute new_urls
8 9 10 |
# File 'lib/archaeo/content_tracker.rb', line 8 def new_urls @new_urls end |
#removed_urls ⇒ Object
Returns the value of attribute removed_urls
8 9 10 |
# File 'lib/archaeo/content_tracker.rb', line 8 def removed_urls @removed_urls end |
#to ⇒ Object
Returns the value of attribute to
8 9 10 |
# File 'lib/archaeo/content_tracker.rb', line 8 def to @to end |
#total_snapshots ⇒ Object
Returns the value of attribute total_snapshots
8 9 10 |
# File 'lib/archaeo/content_tracker.rb', line 8 def total_snapshots @total_snapshots end |
#unique_digests ⇒ Object
Returns the value of attribute unique_digests
8 9 10 |
# File 'lib/archaeo/content_tracker.rb', line 8 def unique_digests @unique_digests end |
#url ⇒ Object
Returns the value of attribute url
8 9 10 |
# File 'lib/archaeo/content_tracker.rb', line 8 def url @url end |
Instance Method Details
#any_changes? ⇒ Boolean
14 15 16 |
# File 'lib/archaeo/content_tracker.rb', line 14 def any_changes? !changed_urls.empty? || !new_urls.empty? || !removed_urls.empty? end |
#as_json ⇒ Object
32 33 34 |
# File 'lib/archaeo/content_tracker.rb', line 32 def as_json(*) to_h end |
#to_h ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/archaeo/content_tracker.rb', line 18 def to_h { url: url, from: from.to_s, to: to.to_s, changed_urls: changed_urls, new_urls: new_urls, removed_urls: removed_urls, content_frequency: content_frequency, total_snapshots: total_snapshots, unique_digests: unique_digests, } end |