Class: Syncthing::Helper::CLI::DeviceCreateCommand
- Inherits:
-
AbstractCommand
- Object
- Clamp::Command
- AbstractCommand
- Syncthing::Helper::CLI::DeviceCreateCommand
- Defined in:
- lib/syncthing/helper/cli/device_command.rb
Instance Method Summary collapse
-
#execute ⇒ Object
parameter ‘DEVICE_LABEL’, ‘Syncthing human readable device label’, attribute_name: :device_label, required: true.
Methods included from InstanceMethods
#col, #delete_record, #query, #tabled_stdout, #trigger_updates
Instance Method Details
#execute ⇒ Object
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 |