Class: Babushka::BSDSystemProfile
Instance Method Summary
collapse
#bsd?, #codename, #codename_str, #cpu_type, #definition, #description, #differentiator_for, #flavour, #hostname, #library_ext, #linux?, #match_list, #matcher, #matches?, #osx?, #pkg_helper, #pkg_helper_key, #pkg_helper_str, #public_ip, #system_description, #total_memory, #version_info
cmd_dir, current_username, log_shell, login_shell, raw_shell, shell, shell!, shell?, shell_cmd, sudo, which
Methods included from LogHelpers
debug, deprecated!, log, log_block, log_error, log_ok, log_stderr, log_warn, removed!
Instance Method Details
112
|
# File 'lib/babushka/system_profile.rb', line 112
def cpus; shell('sysctl -n hw.ncpu').to_i end
|
#flavour_str ⇒ Object
109
|
# File 'lib/babushka/system_profile.rb', line 109
def flavour_str; 'Unknown' end
|
#get_version_info ⇒ Object
113
|
# File 'lib/babushka/system_profile.rb', line 113
def get_version_info; shell 'uname -v' end
|
111
|
# File 'lib/babushka/system_profile.rb', line 111
def release; version.match(/^\d+\.\d+/).to_s end
|
107
|
# File 'lib/babushka/system_profile.rb', line 107
def system; :bsd end
|
#system_str ⇒ Object
108
|
# File 'lib/babushka/system_profile.rb', line 108
def system_str; 'BSD' end
|
110
|
# File 'lib/babushka/system_profile.rb', line 110
def version; shell('uname -r') end
|