Class: Imap::Backup::FileMode
- Inherits:
-
Object
- Object
- Imap::Backup::FileMode
- Defined in:
- lib/imap/backup/file_mode.rb
Instance Method Summary collapse
-
#initialize(filename:) ⇒ FileMode
constructor
A new instance of FileMode.
- #mode ⇒ Object
Constructor Details
#initialize(filename:) ⇒ FileMode
Returns a new instance of FileMode.
5 6 7 |
# File 'lib/imap/backup/file_mode.rb', line 5 def initialize(filename:) @filename = filename end |
Instance Method Details
#mode ⇒ Object
9 10 11 12 13 14 |
# File 'lib/imap/backup/file_mode.rb', line 9 def mode return nil if !File.exist?(filename) stat = File.stat(filename) stat.mode & 0o777 end |