Class: Sys::Proc::Helper::System

Inherits:
Object
  • Object
show all
Defined in:
lib/sys/proc/helper/system.rb

Overview

System helper

Defined Under Namespace

Classes: Generic

Instance Method Summary collapse

Instance Method Details

#identifySymbol

Identify operating system

Returns:

  • (Symbol)


14
15
16
17
18
19
# File 'lib/sys/proc/helper/system.rb', line 14

def identify
  (RbConfig::CONFIG['host_os'] || 'generic')
    .tr('-', '_')
    .gsub(/[0-9]+(\.[0-9]+)*$/, '')
    .to_sym
end