inspec/lib/vulcano/targets/core.rb

26 lines
492 B
Ruby
Raw Normal View History

# encoding: utf-8
2015-09-04 07:59:30 +00:00
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|
2015-09-05 14:07:54 +00:00
handler = modules.values.find { |m| m.handles?(target) }
if handler.nil?
2015-09-04 07:59:30 +00:00
fail "Don't know how to handle target: #{target}"
end
handler.resolve(target)
end.flatten
end
end
end