class ProcessObserver::Process
Class representing process.
Attributes
memory[R]
@return [Integer, nil] memory amount of consumed memory.
name[R]
@return [String] name name of the executable or command.
pid[R]
@return [Integer] pid process ID.
Public Class Methods
new(options)
click to toggle source
Initialize new process.
@param options [Hash]
@option options [String] name name of the executable or command. @option options [Integer] pid process ID. @option options [Integer, nil] memory amount of consumed memory.
# File lib/process_observer/process.rb, line 27 def initialize(options) @name = options[:image_name].to_s @pid = options[:pid].to_i @memory = options[:memory] ? options[:memory].to_i : nil end