Class: FreeImage::Boolean

Inherits:
Object
  • Object
show all
Extended by:
FFI::DataConverter
Defined in:
lib/free-image/types/boolean.rb

Class Method Summary collapse

Class Method Details

.from_native(val, ctx) ⇒ Object



10
11
12
# File 'lib/free-image/types/boolean.rb', line 10

def self.from_native(val, ctx)
  val == 0 ? false : true
end

.to_native(val, ctx) ⇒ Object



6
7
8
# File 'lib/free-image/types/boolean.rb', line 6

def self.to_native(val, ctx)
  val == false ? 0 : 1
end