Module: UBLK
- Defined in:
- lib/ublk.rb,
lib/ublk/device.rb,
lib/ublk/params.rb,
lib/ublk/target.rb,
lib/ublk/control.rb,
lib/ublk/version.rb,
lib/ublk/device_info.rb,
sig/ublk.rbs,
ext/ublk/ublk.c
Defined Under Namespace
Modules: Native Classes: Control, Device, DeviceError, DeviceInfo, Error, Params, Target, UnsupportedError
Constant Summary collapse
- VERSION =
"1.0.0"
Class Attribute Summary collapse
-
.native_load_error ⇒ LoadError?
readonly
Returns the value of attribute native_load_error.
Class Method Summary collapse
Class Attribute Details
.native_load_error ⇒ LoadError? (readonly)
Returns the value of attribute native_load_error.
20 21 22 |
# File 'lib/ublk.rb', line 20 def native_load_error @native_load_error end |
Class Method Details
.ensure_supported! ⇒ nil
26 27 28 29 30 31 |
# File 'lib/ublk.rb', line 26 def ensure_supported! return if supported? detail = native_load_error&. || "/dev/ublk-control is unavailable" raise UnsupportedError, "ublk requires Linux 6.6+, ublk_drv, and liburing (#{detail})" end |
.supported? ⇒ Boolean
22 23 24 |
# File 'lib/ublk.rb', line 22 def supported? !!(defined?(Native) && Native.supported?) end |