Method: LinuxStat::BIOS.version
- Defined in:
- lib/linux_stat/bios.rb
.version ⇒ Object
Returns the version of the BIOS.
If the information is not available it will return a frozen empty string.
The output is also cached (memoized) ; as changing the value in runtime is unexpected.
44 45 46 47 48 49 50 |
# File 'lib/linux_stat/bios.rb', line 44 def version @@version ||= if File.readable?('/sys/devices/virtual/dmi/id/bios_version') IO.read('/sys/devices/virtual/dmi/id/bios_version').tap(&:strip!) else ''.freeze end end |