Class: WebpageArchivist::Instance

Inherits:
Sequel::Model
  • Object
show all
Defined in:
lib/webpage-archivist/models.rb

Instance Method Summary collapse

Instance Method Details

#small_snapshot_pathObject



98
99
100
101
102
# File 'lib/webpage-archivist/models.rb', line 98

def small_snapshot_path
  if snapshot
    "#{webpage.id}/#{self.id}-small.#{Snapshoter.format}"
  end
end

#snapshot_pathObject



104
105
106
107
108
# File 'lib/webpage-archivist/models.rb', line 104

def snapshot_path
  if snapshot
    "#{webpage.id}/#{self.id}.#{Snapshoter.format}"
  end
end

#validateObject



93
94
95
96
# File 'lib/webpage-archivist/models.rb', line 93

def validate
  super
  validates_presence [:webpage_id, :commit_timestamp]
end