Class: Struct::Group

Inherits:
Rubinius::FFI::Struct
  • Object
show all
Defined in:
lib/etc.rb

Constant Summary collapse

FFI =
Rubinius::FFI

Instance Method Summary collapse

Instance Method Details

#gidObject



41
# File 'lib/etc.rb', line 41

def gid; self[:gr_gid]; end

#memObject



43
44
45
46
47
48
49
50
51
52
53
54
55
56
# File 'lib/etc.rb', line 43

def mem
  ptr = self[:gr_mem].read_pointer

  ary = []
  i = 1

  while not ptr.null? do
    ary << ptr.read_string
    ptr = (self[:gr_mem] + i * FFI::Pointer.size).read_pointer
    i += 1
  end

  ary
end

#nameObject



40
# File 'lib/etc.rb', line 40

def name; self[:gr_name]; end

#passwdObject



42
# File 'lib/etc.rb', line 42

def passwd; self[:gr_passwd]; end