mirror of
https://github.com/inspec/inspec
synced 2024-12-18 17:14:33 +00:00
20 lines
445 B
Ruby
20 lines
445 B
Ruby
# encoding: utf-8
|
|
# author: Dominik Richter
|
|
# author: Christoph Hartmann
|
|
|
|
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
|
|
end
|
|
end
|