Class: Prospector::Background::EnvironmentDetector

Inherits:
Object
  • Object
show all
Defined in:
lib/prospector/background/environment_detector.rb

Constant Summary collapse

RAILS_SERVERS =
%w(passenger unicorn puma thin rainbows webrick).freeze

Instance Method Summary collapse

Instance Method Details

#rails_server?Boolean

Returns:

  • (Boolean)


5
6
7
8
9
10
11
# File 'lib/prospector/background/environment_detector.rb', line 5

def rails_server?
  RAILS_SERVERS.each do |server_name|
    return true if send("running_#{ server_name }?")
  end

  false
end