inspec/lib/vulcano/targets/core.rb
Dominik Richter 61794072e5 generalize folder handling
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-08-12 20:47:02 -07:00

25 lines
478 B
Ruby

# encoding: utf-8
require 'utils/modulator'
module Vulcano
module Targets
extend Modulator
def self.__resolve(items)
items.map do |item|
end.flatten
end
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