mirror of
https://github.com/inspec/inspec
synced 2024-12-23 03:23:27 +00:00
6e4381f2d4
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
19 lines
394 B
Ruby
19 lines
394 B
Ruby
# encoding: utf-8
|
|
require 'utils/modulator'
|
|
|
|
module Vulcano
|
|
module Targets
|
|
extend Modulator
|
|
|
|
def self.resolve(targets)
|
|
Array(targets).map do |target|
|
|
handler = modules.values.find{|m| m.handles?(target)}
|
|
if handler.nil?
|
|
raise "Don't know how to handle target: #{target}"
|
|
end
|
|
handler.resolve(target)
|
|
end.flatten
|
|
end
|
|
|
|
end
|
|
end
|