Module: Mount::C::IO

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

Defined Under Namespace

Modules: CFunc

Class Method Summary collapse

Class Method Details

.from_native(value, ctx) ⇒ Object



126
127
128
# File 'lib/rbmount/c.rb', line 126

def self.from_native (value, ctx)
  ::IO.for_fd(Mount::C::IO::CFunc.fileno(value), 'r+')
end

.to_native(value, ctx) ⇒ Object



122
123
124
# File 'lib/rbmount/c.rb', line 122

def self.to_native (value, ctx)
  Mount::C::IO::CFunc.fdopen(value.fileno, 'r+')
end