Class: Attractor::JsDetector

Inherits:
BaseDetector
  • Object
show all
Defined in:
lib/attractor/detectors/js_detector.rb

Instance Method Summary collapse

Instance Method Details

#detectObject


3
4
5
# File 'lib/attractor/detectors/js_detector.rb', line 3

def detect
  package_json_exists?
end

#package_json_exists?Boolean

Returns:

  • (Boolean)

7
8
9
# File 'lib/attractor/detectors/js_detector.rb', line 7

def package_json_exists?
  File.exist? File.expand_path("package.json", Dir.pwd)
end