Class: Syncthing::Helper::CLI::DeviceCreateCommand

Inherits:
AbstractCommand
  • Object
show all
Defined in:
lib/syncthing/helper/cli/device_command.rb

Instance Method Summary collapse

Methods included from InstanceMethods

#col, #delete_record, #query, #tabled_stdout, #trigger_updates

Instance Method Details

#executeObject

parameter ‘DEVICE_LABEL’, ‘Syncthing human readable device label’, attribute_name: :device_label, required: true



8
9
10
11
12
13
14
15
# File 'lib/syncthing/helper/cli/device_command.rb', line 8

def execute
  super
  device_ids.each do |d|
    device_id, device_label = d.split ':'
    API::Firestore.doc('devices/' + device_id).set(device_id: device_id, label: device_label)
  end
  trigger_updates
end