Class: CZTop::Config::Traversing::SiblingsAccessor

Inherits:
FamilyAccessor show all
Defined in:
lib/cztop/config/traversing.rb

Overview

Accesses the younger siblings of a given CZTop::Config item.

Instance Method Summary collapse

Methods inherited from FamilyAccessor

#==, #each, #initialize

Constructor Details

This class inherits a constructor from CZTop::Config::Traversing::FamilyAccessor

Instance Method Details

#firstConfig?

Returns the first sibling.

Returns:

  • (Config)
  • (nil)

    if no younger siblings


106
107
108
109
110
# File 'lib/cztop/config/traversing.rb', line 106

def first
  ptr = @config.ffi_delegate.next
  return nil if ptr.null?
  CZTop::Config.from_ffi_delegate(ptr)
end