Class: Dynosaur::Process::Local::Finder

Inherits:
Object
  • Object
show all
Defined in:
lib/dynosaur/process/local/finder.rb

Instance Method Summary collapse

Constructor Details

#initialize(rake_command:) ⇒ Finder

Returns a new instance of Finder.



8
9
10
# File 'lib/dynosaur/process/local/finder.rb', line 8

def initialize(rake_command:)
  @rake_command = rake_command
end

Instance Method Details

#exists?Boolean

Returns:

  • (Boolean)


12
13
14
15
16
17
# File 'lib/dynosaur/process/local/finder.rb', line 12

def exists?
  Sys::ProcTable.ps.map(&:cmdline).any? do |command|
    Utils::RakeCommand.valid?(command) &&
      Utils::RakeCommand.parse(command) == rake_command
  end
end