Method: LinuxStat::Kernel.string
- Defined in:
- lib/linux_stat/kernel.rb
.string ⇒ Object
Reads maximum 1024 bytes from /proc/version and returns the string.
The output is also cached ; as changing the value in runtime is unexpected.
169 170 171 |
# File 'lib/linux_stat/kernel.rb', line 169 def string @@string ||= File.readable?('/proc/version') ? IO.read('/proc/version', 1024).tap(&:strip!) : '' end |