Class: Backup
- Inherits:
-
Object
- Object
- Backup
- Defined in:
- lib/backup_management/backup.rb
Instance Attribute Summary collapse
-
#application_file ⇒ Object
Returns the value of attribute application_file.
-
#comment ⇒ Object
Returns the value of attribute comment.
-
#database_file ⇒ Object
Returns the value of attribute database_file.
-
#time ⇒ Object
Returns the value of attribute time.
Instance Method Summary collapse
- #human_readable_time ⇒ Object
-
#initialize(time, application_file, database_file, comment = nil) ⇒ Backup
constructor
A new instance of Backup.
Constructor Details
#initialize(time, application_file, database_file, comment = nil) ⇒ Backup
Returns a new instance of Backup.
9 10 11 12 13 14 |
# File 'lib/backup_management/backup.rb', line 9 def initialize(time, application_file, database_file, comment = nil) self.time = time self.application_file = application_file self.database_file = database_file self.comment = comment end |
Instance Attribute Details
#application_file ⇒ Object
Returns the value of attribute application_file.
7 8 9 |
# File 'lib/backup_management/backup.rb', line 7 def application_file @application_file end |
#comment ⇒ Object
Returns the value of attribute comment.
7 8 9 |
# File 'lib/backup_management/backup.rb', line 7 def comment @comment end |
#database_file ⇒ Object
Returns the value of attribute database_file.
7 8 9 |
# File 'lib/backup_management/backup.rb', line 7 def database_file @database_file end |
#time ⇒ Object
Returns the value of attribute time.
7 8 9 |
# File 'lib/backup_management/backup.rb', line 7 def time @time end |
Instance Method Details
#human_readable_time ⇒ Object
16 17 18 |
# File 'lib/backup_management/backup.rb', line 16 def human_readable_time DateTime.parse(self.time).strftime("%m-%d-%Y %H:%M:%S") end |