Class: Struct::Group
- Inherits:
-
Rubinius::FFI::Struct
- Object
- Rubinius::FFI::Struct
- Struct::Group
- Defined in:
- lib/etc.rb
Constant Summary collapse
- FFI =
Rubinius::FFI
Instance Method Summary collapse
Instance Method Details
#gid ⇒ Object
41 |
# File 'lib/etc.rb', line 41 def gid; self[:gr_gid]; end |
#mem ⇒ Object
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 |
#name ⇒ Object
40 |
# File 'lib/etc.rb', line 40 def name; self[:gr_name]; end |
#passwd ⇒ Object
42 |
# File 'lib/etc.rb', line 42 def passwd; self[:gr_passwd]; end |