mirror of
https://github.com/inspec/inspec
synced 2024-11-15 09:27:20 +00:00
d7bcf6dfea
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
34 lines
662 B
Ruby
34 lines
662 B
Ruby
# encoding: utf-8
|
|
|
|
module Vulcano
|
|
module Plugins
|
|
|
|
class Resource
|
|
def self.name( name )
|
|
Vulcano::Plugins::Resource.__register(name, self)
|
|
end
|
|
|
|
def self.__register(name, obj)
|
|
cl = Class.new(obj) do
|
|
include Vulcano::Plugins::ResourceCommon
|
|
def initialize(backend, *args)
|
|
@vulcano = backend
|
|
super(*args)
|
|
end
|
|
end
|
|
Vulcano::Resource.registry[name] = cl
|
|
end
|
|
end
|
|
|
|
module ResourceCommon
|
|
def resource_skipped
|
|
@resource_skipped
|
|
end
|
|
|
|
def skip_resource message
|
|
@resource_skipped = message
|
|
end
|
|
end
|
|
|
|
end
|
|
end
|