Class: Syncthing::Helper::CLI::FolderReadCommand
- Inherits:
-
AbstractCommand
- Object
- Clamp::Command
- AbstractCommand
- Syncthing::Helper::CLI::FolderReadCommand
- Defined in:
- lib/syncthing/helper/cli/folder_command.rb
Instance Method Summary collapse
Methods included from InstanceMethods
#col, #delete_record, #query, #tabled_stdout, #trigger_updates
Instance Method Details
#execute ⇒ Object
24 25 26 27 28 29 30 31 32 33 |
# File 'lib/syncthing/helper/cli/folder_command.rb', line 24 def execute super col = 'folders' docs = API::Firestore.col(col).get.map(&:document_id) res = docs.map do |d| dr = API::Firestore.doc(col + '/' + d).get.data [dr[:id], dr[:path], dr[:label]] end tabled_stdout header: ['Folder Id', 'Path', 'Label'], rows: res end |