Class: BiblioTech::Backups::FileRecord
- Inherits:
-
Object
- Object
- BiblioTech::Backups::FileRecord
- Defined in:
- lib/bibliotech/backups/file_record.rb
Instance Attribute Summary collapse
-
#keep ⇒ Object
Returns the value of attribute keep.
-
#path ⇒ Object
Returns the value of attribute path.
-
#scheduled_by ⇒ Object
Returns the value of attribute scheduled_by.
-
#timestamp ⇒ Object
Returns the value of attribute timestamp.
Instance Method Summary collapse
- #in_schedule(name) ⇒ Object
-
#initialize(path, timestamp) ⇒ FileRecord
constructor
A new instance of FileRecord.
- #keep? ⇒ Boolean
Constructor Details
#initialize(path, timestamp) ⇒ FileRecord
Returns a new instance of FileRecord.
6 7 8 9 10 |
# File 'lib/bibliotech/backups/file_record.rb', line 6 def initialize(path, ) @path, @timestamp = path, @keep = false @scheduled_by = [] end |
Instance Attribute Details
#keep ⇒ Object
Returns the value of attribute keep.
4 5 6 |
# File 'lib/bibliotech/backups/file_record.rb', line 4 def keep @keep end |
#path ⇒ Object
Returns the value of attribute path.
4 5 6 |
# File 'lib/bibliotech/backups/file_record.rb', line 4 def path @path end |
#scheduled_by ⇒ Object
Returns the value of attribute scheduled_by.
4 5 6 |
# File 'lib/bibliotech/backups/file_record.rb', line 4 def scheduled_by @scheduled_by end |
#timestamp ⇒ Object
Returns the value of attribute timestamp.
4 5 6 |
# File 'lib/bibliotech/backups/file_record.rb', line 4 def @timestamp end |
Instance Method Details
#in_schedule(name) ⇒ Object
16 17 18 19 |
# File 'lib/bibliotech/backups/file_record.rb', line 16 def in_schedule(name) @scheduled_by << name @keep = true end |
#keep? ⇒ Boolean
12 13 14 |
# File 'lib/bibliotech/backups/file_record.rb', line 12 def keep? !!@keep end |