inspec/lib/vulcano/targets/file.rb
Christoph Hartmann 8fff2ee989 add author header
2015-10-06 18:55:44 +02:00

20 lines
374 B
Ruby

# encoding: utf-8
# author: Dominik Richter
# author: Christoph Hartmann
module Vulcano::Targets
class FileHelper
def handles?(target)
File.file?(target) and target.end_with?('.rb')
end
def resolve(target)
{
content: File.read(target),
ref: target,
}
end
end
Vulcano::Targets.add_module('file', FileHelper.new)
end