improvement: expose os detector function in os resource

This commit is contained in:
Christoph Hartmann 2015-10-07 18:28:34 +02:00
parent bcde1c6dc7
commit 55e09963c8

View file

@ -6,6 +6,13 @@ module Vulcano::Resources
class OS < Vulcano.resource(1)
name 'os'
# reuse helper methods from backend
%w{redhat? debian? suse? bsd? solaris? linux? unix? windows?}.each do |os_family|
define_method((os_family).to_sym) do
vulcano.backend.os.send(os_family)
end
end
def [](name)
vulcano.backend.os[name]
end