Class: Specinfra::Helper::DetectOs

Inherits:
Object
  • Object
show all
Defined in:
lib/specinfra/helper/detect_os.rb

Defined Under Namespace

Classes: Aix, Alpine, Arch, Clearlinux, Coreos, Darwin, Debian, Devuan, Eos, Esxi, Freebsd, Gentoo, Guix, Nixos, Openbsd, Photon, Plamo, Poky, Redhat, Solaris, Suse, Voidlinux

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(backend) ⇒ DetectOs

Returns a new instance of DetectOs.



8
9
10
# File 'lib/specinfra/helper/detect_os.rb', line 8

def initialize(backend)
  @backend = backend
end

Class Method Details

.detectObject



4
5
6
# File 'lib/specinfra/helper/detect_os.rb', line 4

def self.detect
  self.new(Specinfra.backend).detect
end

Instance Method Details

#detectObject

Raises:

  • (NotImplementedError)


16
17
18
# File 'lib/specinfra/helper/detect_os.rb', line 16

def detect
  raise NotImplementedError
end

#run_command(cmd) ⇒ Object



12
13
14
# File 'lib/specinfra/helper/detect_os.rb', line 12

def run_command(cmd)
  @backend.run_command(cmd)
end