Class: RFuse::Flock
- Inherits:
-
Object
- Object
- RFuse::Flock
- Defined in:
- lib/rfuse/flock.rb
Overview
Wrapper for FFI:Flock back to RFuse
Instance Attribute Summary collapse
-
#delegate ⇒ Object
readonly
Returns the value of attribute delegate.
Instance Method Summary collapse
-
#initialize(ffi_flock) ⇒ Flock
constructor
A new instance of Flock.
- #l_len ⇒ Object
- #l_pid ⇒ Object
- #l_start ⇒ Object
- #l_type ⇒ Object
- #l_whence ⇒ Object
Constructor Details
#initialize(ffi_flock) ⇒ Flock
Returns a new instance of Flock.
7 8 9 |
# File 'lib/rfuse/flock.rb', line 7 def initialize(ffi_flock) @delegate = ffi_flock end |
Instance Attribute Details
#delegate ⇒ Object (readonly)
Returns the value of attribute delegate.
5 6 7 |
# File 'lib/rfuse/flock.rb', line 5 def delegate @delegate end |
Instance Method Details
#l_len ⇒ Object
23 24 25 |
# File 'lib/rfuse/flock.rb', line 23 def l_len delegate.len end |
#l_pid ⇒ Object
27 28 29 |
# File 'lib/rfuse/flock.rb', line 27 def l_pid delegate.pid end |
#l_start ⇒ Object
19 20 21 |
# File 'lib/rfuse/flock.rb', line 19 def l_start delegate.start end |
#l_type ⇒ Object
11 12 13 |
# File 'lib/rfuse/flock.rb', line 11 def l_type FFI::Flock::Enums::LockType.to_h[delegate.type] || 0 end |
#l_whence ⇒ Object
15 16 17 |
# File 'lib/rfuse/flock.rb', line 15 def l_whence FFI::Flock::Enums::SeekWhenceShort.to_h[delegate.whence] || 0 end |