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.
171 172 173 |
# File 'lib/linux_stat/kernel.rb', line 171 def string @@string ||= File.readable?('/proc/version') ? IO.read('/proc/version', 1024).tap(&:strip!) : '' end |