dont redefine classmethod on initialize

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
This commit is contained in:
Dominik Richter 2015-09-06 20:35:41 +02:00
parent 90b56f069e
commit 17386740c7

View file

@ -13,10 +13,14 @@ module Vulcano
include Vulcano::Plugins::ResourceCommon
def initialize(backend, *args)
# attach the backend to this instance
self.class.send(:define_method, :vulcano) { backend }
@__backend_runner__ = backend
# call the resource initializer
super(*args)
end
def vulcano
@__backend_runner__
end
end
# add the resource to the registry by name