class Syncthing::Helper::CLI::DeviceReadCommand
Public Instance Methods
execute()
click to toggle source
Calls superclass method
Syncthing::Helper::CLI::AbstractCommand#execute
# File lib/syncthing/helper/cli/device_command.rb, line 19 def execute super col = 'devices' docs = API::Firestore.col(col).get.map(&:document_id) res = docs.map{|d| dr = API::Firestore.doc(col + '/' + d).get.data; [dr[:device_id], dr[:label]]} tabled_stdout header: ['Device Id', 'Label'], rows: res end