Class: AgentsControl::ProcessProbe::Process
- Inherits:
-
Struct
- Object
- Struct
- AgentsControl::ProcessProbe::Process
- Defined in:
- lib/agents_control/process_probe.rb
Instance Attribute Summary collapse
-
#command ⇒ Object
Returns the value of attribute command.
-
#pid ⇒ Object
Returns the value of attribute pid.
-
#stat ⇒ Object
Returns the value of attribute stat.
-
#tty ⇒ Object
Returns the value of attribute tty.
Instance Method Summary collapse
- #agent ⇒ Object
- #agent? ⇒ Boolean
-
#foreground? ⇒ Boolean
+in the stat column marks a process in the foreground group — i.e. - #name ⇒ Object
- #terminal? ⇒ Boolean
Instance Attribute Details
#command ⇒ Object
Returns the value of attribute command
25 26 27 |
# File 'lib/agents_control/process_probe.rb', line 25 def command @command end |
#pid ⇒ Object
Returns the value of attribute pid
25 26 27 |
# File 'lib/agents_control/process_probe.rb', line 25 def pid @pid end |
#stat ⇒ Object
Returns the value of attribute stat
25 26 27 |
# File 'lib/agents_control/process_probe.rb', line 25 def stat @stat end |
#tty ⇒ Object
Returns the value of attribute tty
25 26 27 |
# File 'lib/agents_control/process_probe.rb', line 25 def tty @tty end |
Instance Method Details
#agent ⇒ Object
30 |
# File 'lib/agents_control/process_probe.rb', line 30 def agent = AGENT_BINARIES[name] |
#agent? ⇒ Boolean
31 |
# File 'lib/agents_control/process_probe.rb', line 31 def agent? = !agent.nil? |
#foreground? ⇒ Boolean
+ in the stat column marks a process in the foreground group —
i.e. what the user is currently interacting with.
28 |
# File 'lib/agents_control/process_probe.rb', line 28 def foreground? = stat.to_s.include?("+") |
#name ⇒ Object
29 |
# File 'lib/agents_control/process_probe.rb', line 29 def name = File.basename(command.to_s) |
#terminal? ⇒ Boolean
32 |
# File 'lib/agents_control/process_probe.rb', line 32 def terminal? = tty != NO_TTY |