Sha256: 160fc1d68cae849e7f7fa7bfa181c64c19d5bd93303ef1421d4f4fda91c6e20b
Contents?: true
Size: 480 Bytes
Versions: 14
Compression:
Stored size: 480 Bytes
Contents
module Datacenter class OS def initialize(shell=nil) @shell = shell || Shell::Localhost.new end def name shell.run 'uname -o' end def distribution shell.run('lsb_release -i').split(':')[1].strip end def version shell.run('lsb_release -r').split(':')[1].strip end def kernel shell.run 'uname -r' end def platform shell.run 'uname -i' end private attr_reader :shell end end
Version data entries
14 entries across 14 versions & 1 rubygems