Class: HrrRbLxns::Files::File
- Inherits:
-
Object
- Object
- HrrRbLxns::Files::File
- Defined in:
- lib/hrr_rb_lxns/files/file.rb
Overview
A class that takes a path to a namespace file and collects then keeps its inode.
Instance Attribute Summary collapse
-
#ino ⇒ Integer?
readonly
Returns the file information of attribute :ino.
-
#path ⇒ String
readonly
Returns the file information of attribute :path.
Instance Method Summary collapse
-
#initialize(path) ⇒ File
constructor
A new instance of File.
Constructor Details
#initialize(path) ⇒ File
Returns a new instance of File.
27 28 29 30 |
# File 'lib/hrr_rb_lxns/files/file.rb', line 27 def initialize path @path = path @ino = ::File.exist?(path) ? ::File.stat(path).ino : nil end |
Instance Attribute Details
#ino ⇒ Integer? (readonly)
Returns the file information of attribute :ino.
23 24 25 |
# File 'lib/hrr_rb_lxns/files/file.rb', line 23 def ino @ino end |
#path ⇒ String (readonly)
Returns the file information of attribute :path.
17 18 19 |
# File 'lib/hrr_rb_lxns/files/file.rb', line 17 def path @path end |