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



122
123
124
125
126
127
# File 'lib/cztop/config/traversing.rb', line 122

def first
  ptr = @config.ffi_delegate.next
  return nil if ptr.null?

  CZTop::Config.from_ffi_delegate(ptr)
end