inspec/lib/vulcano/plugins/resource.rb
Dominik Richter d7bcf6dfea move resource plugin to vulcano/plugins
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-08-28 11:49:21 -07:00

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