Class: LFP::SpawnFileActions
- Inherits:
-
Object
- Object
- LFP::SpawnFileActions
- Defined in:
- lib/libfixposix/ffi.rb
Constant Summary collapse
- SIZEOF =
32
Instance Attribute Summary collapse
-
#this ⇒ Object
(also: #to_ptr)
readonly
Returns the value of attribute this.
Instance Method Summary collapse
-
#addclose(*args) ⇒ Object
int (lfp_spawn_file_actions_t *file_actions, int fd).
-
#adddup2(*args) ⇒ Object
int (lfp_spawn_file_actions_t *file_actions, int fd, int newfd).
-
#addkeep(*args) ⇒ Object
int (lfp_spawn_file_actions_t *file_actions, int fd).
-
#addopen(*args) ⇒ Object
int (lfp_spawn_file_actions_t *file_actions, int fd, const char *path, unsigned long int oflags, mode_t mode).
-
#destroy(*args) ⇒ Object
int (lfp_spawn_file_actions_t *file_actions).
-
#init(*args) ⇒ Object
int (lfp_spawn_file_actions_t *file_actions).
-
#initialize ⇒ SpawnFileActions
constructor
A new instance of SpawnFileActions.
Constructor Details
#initialize ⇒ SpawnFileActions
Returns a new instance of SpawnFileActions.
55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/libfixposix/ffi.rb', line 55 def initialize if block_given? ret = nil # ffi doesn't return the result, must save it manually FFI::MemoryPointer.new(:uint8, SIZEOF) do |ptr| @this = ptr ret = yield self end ret else @this = FFI::MemoryPointer.new(:uint8, SIZEOF) end end |
Instance Attribute Details
#this ⇒ Object (readonly) Also known as: to_ptr
Returns the value of attribute this.
67 68 69 |
# File 'lib/libfixposix/ffi.rb', line 67 def this @this end |
Instance Method Details
#addclose(*args) ⇒ Object
int (lfp_spawn_file_actions_t *file_actions, int fd)
73 |
# File 'lib/libfixposix/ffi.rb', line 73 def addclose(*args); LFP.spawn_file_actions_addclose(@this, *args); end |
#adddup2(*args) ⇒ Object
int (lfp_spawn_file_actions_t *file_actions, int fd, int newfd)
76 |
# File 'lib/libfixposix/ffi.rb', line 76 def adddup2(*args); LFP.spawn_file_actions_adddup2(@this, *args); end |
#addkeep(*args) ⇒ Object
int (lfp_spawn_file_actions_t *file_actions, int fd)
79 |
# File 'lib/libfixposix/ffi.rb', line 79 def addkeep(*args); LFP.spawn_file_actions_addkeep(@this, *args); end |
#addopen(*args) ⇒ Object
int (lfp_spawn_file_actions_t *file_actions, int fd, const char *path, unsigned long int oflags, mode_t mode)
82 |
# File 'lib/libfixposix/ffi.rb', line 82 def addopen(*args); LFP.spawn_file_actions_addopen(@this, *args); end |
#destroy(*args) ⇒ Object
int (lfp_spawn_file_actions_t *file_actions)
85 |
# File 'lib/libfixposix/ffi.rb', line 85 def destroy(*args); LFP.spawn_file_actions_destroy(@this, *args); end |
#init(*args) ⇒ Object
int (lfp_spawn_file_actions_t *file_actions)
88 |
# File 'lib/libfixposix/ffi.rb', line 88 def init(*args); LFP.spawn_file_actions_init(@this, *args); end |