Class: FT::ListRec

Inherits:
FFIAdditions::Struct
  • Object
show all
Defined in:
lib/ft-ffi/struct/list/rec.rb

Overview

Instance Method Summary collapse

Instance Method Details

#empty?Boolean

define FT_IS_EMPTY( list ) ( (list).head == 0 )

Returns:

  • (Boolean)


19
20
21
# File 'lib/ft-ffi/struct/list/rec.rb', line 19

def empty?
  self[:head] == 0
end

#headObject



6
# File 'lib/ft-ffi/struct/list/rec.rb', line 6

def head; end

#head=(v) ⇒ Object



7
# File 'lib/ft-ffi/struct/list/rec.rb', line 7

def head=(v); end

#inspectObject



23
24
25
# File 'lib/ft-ffi/struct/list/rec.rb', line 23

def inspect
  members.map { |member| "#{member.inspect} = #{self[member]}" }.join(', ')
end

#tailObject



8
# File 'lib/ft-ffi/struct/list/rec.rb', line 8

def tail; end

#tail=(v) ⇒ Object



9
# File 'lib/ft-ffi/struct/list/rec.rb', line 9

def tail=(v); end

#to_sObject



14
15
16
# File 'lib/ft-ffi/struct/list/rec.rb', line 14

def to_s
  inspect
end