Class: Ductwork::MachineIdentifier
- Inherits:
-
Object
- Object
- Ductwork::MachineIdentifier
- Defined in:
- lib/ductwork/machine_identifier.rb
Class Method Summary collapse
Class Method Details
.fetch ⇒ Object
5 6 7 8 9 |
# File 'lib/ductwork/machine_identifier.rb', line 5 def self.fetch File.read("/etc/machine-id").strip.presence || Socket.gethostname rescue Errno::ENOENT Socket.gethostname end |