Method: Narou.get_device

Defined in:
lib/narou.rb

.get_device(device_name = nil) ⇒ Object



240
241
242
243
244
245
246
# File 'lib/narou.rb', line 240

def get_device(device_name = nil)
  device_name = Inventory.load("local_setting")["device"] unless device_name
  if device_name && Device.exists?(device_name)
    return Device.create(device_name)
  end
  nil
end