Module: BlkID::C::Bool
- Extended by:
- FFI::DataConverter
- Defined in:
- lib/rblkid/c/types.rb
Class Method Summary collapse
Class Method Details
.from_native(value, ctx) ⇒ Object
32 33 34 |
# File 'lib/rblkid/c/types.rb', line 32 def self.from_native(value, ctx) !value.zero? end |
.to_native(value, ctx) ⇒ Object
28 29 30 |
# File 'lib/rblkid/c/types.rb', line 28 def self.to_native(value, ctx) [0, false, nil].include?(value) ? 0 : 1 end |