Method: LinuxStat::BIOS.vendor
- Defined in:
- lib/linux_stat/bios.rb
.vendor ⇒ Object
Returns the vendor 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.
29 30 31 32 33 34 35 36 |
# File 'lib/linux_stat/bios.rb', line 29 def vendor # cached (memoized) ; as changing the value in runtime is unexpected @@vendor ||= if File.readable?('/sys/devices/virtual/dmi/id/bios_vendor') IO.read('/sys/devices/virtual/dmi/id/bios_vendor').tap(&:strip!) else ''.freeze end end |