Sha256: 3ca5149067f36ce00ecaf856494c023ec8c079f3f6a2957e736ccd5d4e071dd3

Contents?: true

Size: 439 Bytes

Versions: 6

Compression:

Stored size: 439 Bytes

Contents

# encoding: utf-8
# author: Dominik Richter
# author: Christoph Hartmann

class OS < Inspec.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
      inspec.backend.os.send(os_family)
    end
  end

  def [](name)
    inspec.backend.os[name]
  end

  def to_s
    'Operating System Detection'
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
inspec-0.9.5 lib/resources/os.rb
inspec-0.9.4 lib/resources/os.rb
inspec-0.9.3 lib/resources/os.rb
inspec-0.9.2 lib/resources/os.rb
inspec-0.9.1 lib/resources/os.rb
inspec-0.9.0 lib/resources/os.rb