Class: BackupFile

Inherits:
Object
  • Object
show all
Includes:
ActiveModel::SerializerSupport
Defined in:
app/models/backup_file.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(filename:, size:, last_modified:, source: nil) ⇒ BackupFile

Returns a new instance of BackupFile.



8
9
10
11
12
13
# File 'app/models/backup_file.rb', line 8

def initialize(filename:, size:, last_modified:, source: nil)
  @filename = filename
  @size = size
  @last_modified = last_modified
  @source = source
end

Instance Attribute Details

#filenameObject (readonly)

Returns the value of attribute filename.



6
7
8
# File 'app/models/backup_file.rb', line 6

def filename
  @filename
end

#last_modifiedObject (readonly)

Returns the value of attribute last_modified.



6
7
8
# File 'app/models/backup_file.rb', line 6

def last_modified
  @last_modified
end

#sizeObject (readonly)

Returns the value of attribute size.



6
7
8
# File 'app/models/backup_file.rb', line 6

def size
  @size
end

#sourceObject (readonly)

Returns the value of attribute source.



6
7
8
# File 'app/models/backup_file.rb', line 6

def source
  @source
end

Instance Method Details

#==(other) ⇒ Object



15
16
17
# File 'app/models/backup_file.rb', line 15

def ==(other)
  attributes == other.attributes
end