mirror of
https://github.com/inspec/inspec
synced 2024-12-30 06:53:22 +00:00
07cb7efe36
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
25 lines
492 B
Ruby
25 lines
492 B
Ruby
# encoding: utf-8
|
|
|
|
require 'utils/modulator'
|
|
|
|
module Vulcano
|
|
module Targets
|
|
extend Modulator
|
|
|
|
def self.__resolve(items)
|
|
items.map do |_|
|
|
# @TODO
|
|
end.flatten
|
|
end
|
|
|
|
def self.resolve(targets)
|
|
Array(targets).map do |target|
|
|
handler = modules.values.find { |m| m.handles?(target) }
|
|
if handler.nil?
|
|
fail "Don't know how to handle target: #{target}"
|
|
end
|
|
handler.resolve(target)
|
|
end.flatten
|
|
end
|
|
end
|
|
end
|