Module: Mount::C::MntBool

Extended by:
FFI::DataConverter
Defined in:
lib/rbmount/c.rb

Class Method Summary collapse

Class Method Details

.from_native(value, ctx) ⇒ Object



90
91
92
# File 'lib/rbmount/c.rb', line 90

def self.from_native (value, ctx)
  value.zero?
end

.to_native(value, ctx) ⇒ Object



86
87
88
# File 'lib/rbmount/c.rb', line 86

def self.to_native (value, ctx)
  [0, false, nil].include?(value) ? 1 : 0
end