Class: Expire::BackupFromPathService
- Inherits:
-
Object
- Object
- Expire::BackupFromPathService
- Defined in:
- lib/expire/backup_from_path_service.rb
Overview
Take a path and return an instance of Expire::Backup
Instance Attribute Summary collapse
-
#by ⇒ Object
readonly
Returns the value of attribute by.
-
#pathname ⇒ Object
readonly
Returns the value of attribute pathname.
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(path:) ⇒ BackupFromPathService
constructor
A new instance of BackupFromPathService.
Constructor Details
#initialize(path:) ⇒ BackupFromPathService
Returns a new instance of BackupFromPathService.
10 11 12 |
# File 'lib/expire/backup_from_path_service.rb', line 10 def initialize(path:) @pathname = Pathname.new(path) end |
Instance Attribute Details
#by ⇒ Object (readonly)
Returns the value of attribute by.
14 15 16 |
# File 'lib/expire/backup_from_path_service.rb', line 14 def by @by end |
#pathname ⇒ Object (readonly)
Returns the value of attribute pathname.
14 15 16 |
# File 'lib/expire/backup_from_path_service.rb', line 14 def pathname @pathname end |
Class Method Details
.call(path:) ⇒ Object
6 7 8 |
# File 'lib/expire/backup_from_path_service.rb', line 6 def self.call(path:) new(path: path).call end |