Class: Fanotify::FileHandle
- Inherits:
-
Data
- Object
- Data
- Fanotify::FileHandle
- Defined in:
- lib/fanotify/file_handle.rb
Overview
Opaque filesystem identifier reported by the kernel.
Instance Attribute Summary collapse
-
#bytes ⇒ Object
readonly
Returns the value of attribute bytes.
-
#fsid ⇒ Object
readonly
Returns the value of attribute fsid.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(fsid:, type:, bytes:) ⇒ FileHandle
constructor
A new instance of FileHandle.
- #to_s ⇒ Object
Constructor Details
#initialize(fsid:, type:, bytes:) ⇒ FileHandle
Returns a new instance of FileHandle.
6 7 8 |
# File 'lib/fanotify/file_handle.rb', line 6 def initialize(fsid:, type:, bytes:) super(fsid: fsid.b.freeze, type:, bytes: bytes.b.freeze) end |
Instance Attribute Details
#bytes ⇒ Object (readonly)
Returns the value of attribute bytes
5 6 7 |
# File 'lib/fanotify/file_handle.rb', line 5 def bytes @bytes end |
#fsid ⇒ Object (readonly)
Returns the value of attribute fsid
5 6 7 |
# File 'lib/fanotify/file_handle.rb', line 5 def fsid @fsid end |
#type ⇒ Object (readonly)
Returns the value of attribute type
5 6 7 |
# File 'lib/fanotify/file_handle.rb', line 5 def type @type end |
Instance Method Details
#to_s ⇒ Object
10 |
# File 'lib/fanotify/file_handle.rb', line 10 def to_s = bytes.unpack1("H*") |