Method: LinuxStat::Kernel.build_user

Defined in:
lib/linux_stat/kernel.rb

.build_userObject

Returns the name of the user who built the kernel using KBUILD_FLAGS.

If the information isn’t available, it will return a frozen empty string.

The output is also cached (memoized) ; as changing the value in runtime is unexpected.



23
24
25
26
27
# File 'lib/linux_stat/kernel.rb', line 23

def build_user
	@@build_user ||= string.split(/(\(.+\))/).each(&:strip!)
		.reject(&:empty?).find { |x| x[/^\(.+\)$/] }.to_s
		.split[0].to_s[1..-2].to_s.freeze
end