Class: ProconBypassMan::WriteDeviceIdCommand
- Inherits:
-
Object
- Object
- ProconBypassMan::WriteDeviceIdCommand
- Defined in:
- lib/procon_bypass_man/commands/write_device_id_command.rb
Class Method Summary collapse
Class Method Details
.execute ⇒ String
3 4 5 6 7 8 9 10 11 |
# File 'lib/procon_bypass_man/commands/write_device_id_command.rb', line 3 def self.execute path = "#{ProconBypassMan.root}/device_id" if(sid = File.read(path)) return sid end rescue Errno::ENOENT File.write(path, "m_#{SecureRandom.uuid}") return SecureRandom.uuid end |