Module: Mount::C::MntCC

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

Class Method Summary collapse

Class Method Details

.from_native(value, ctx) ⇒ Object



104
105
106
107
# File 'lib/rbmount/c.rb', line 104

def self.from_native (value, ctx)
  return 1 if value == 1
  value.zero?
end

.to_native(value, ctx) ⇒ Object



99
100
101
102
# File 'lib/rbmount/c.rb', line 99

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