Class: PBS::Torque::BatchStatus
- Inherits:
-
FFI::ManagedStruct
- Object
- FFI::ManagedStruct
- PBS::Torque::BatchStatus
- Defined in:
- lib/pbs/torque.rb
Overview
Struct for PBS batch server status responses
Class Method Summary collapse
-
.release(ptr) ⇒ Object
Free memory for allocated BatchStatus C-linked list.
Instance Method Summary collapse
-
#to_h ⇒ Hash
Convert to hash describing this linked list.
Class Method Details
.release(ptr) ⇒ Object
Free memory for allocated PBS::Torque::BatchStatus C-linked list
269 270 271 |
# File 'lib/pbs/torque.rb', line 269 def self.release(ptr) pbs_statfree(ptr) end |
Instance Method Details
#to_h ⇒ Hash
Convert to hash describing this linked list
275 276 277 278 279 280 281 282 283 |
# File 'lib/pbs/torque.rb', line 275 def to_h batch = self hash = {} until batch.to_ptr.null? hash[batch[:name]] = batch[:attribs].to_h batch = batch[:next] end hash end |