Class: LocalPac::Actions::ShowProcessInformation::IntegerPidInfo

Inherits:
Object
  • Object
show all
Defined in:
lib/local_pac/actions/show_process_information.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(pid_info) ⇒ IntegerPidInfo

Returns a new instance of IntegerPidInfo.



9
10
11
12
13
# File 'lib/local_pac/actions/show_process_information.rb', line 9

def initialize(pid_info)
  @pid           = pid_info.to_i
  @error_message = "Process \"#{@pid}\" cannot be found. It is not a running process."
  @error_occured = false
end

Instance Attribute Details

#error_messageObject (readonly)

Returns the value of attribute error_message.



7
8
9
# File 'lib/local_pac/actions/show_process_information.rb', line 7

def error_message
  @error_message
end

#pidObject (readonly)

Returns the value of attribute pid.



7
8
9
# File 'lib/local_pac/actions/show_process_information.rb', line 7

def pid
  @pid
end

Instance Method Details

#error?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/local_pac/actions/show_process_information.rb', line 15

def error?
  @error_occured
end