Module: Horatio::Detector

Defined in:
lib/horatio/detector.rb,
lib/horatio/detector/maven.rb,
lib/horatio/detector/docker.rb,
lib/horatio/detector/dynamic.rb,
lib/horatio/detector/rubygem.rb,
lib/horatio/detector/validator.rb,
lib/horatio/detector/io_handler.rb,
lib/horatio/detector/json_reader.rb,
lib/horatio/detector/json_writer.rb,
lib/horatio/detector/null_writer.rb,
lib/horatio/detector/node_package.rb

Defined Under Namespace

Modules: IOHandler, JSONReader, JSONWriter, NULLWritter, Validator Classes: Docker, Dynamic, Maven, NodePackage, RubyGem

Class Method Summary collapse

Class Method Details

.detectObject



9
10
11
12
# File 'lib/horatio/detector.rb', line 9

def self.detect
  detected = [Dynamic, Docker, Maven, RubyGem, NodePackage].detect { |d| d.detect }
  detected ? detected.new : raise("couldn't detect a supported project type, takes docker, maven, gem, horatio")
end