class Devpad::CLI::Commands::Review::File::List
Public Class Methods
new(shell:)
click to toggle source
# File lib/devpad/cli/commands/review/file/list.rb, line 7 def initialize(shell:) @shell = shell end
Public Instance Methods
execute(params = {})
click to toggle source
# File lib/devpad/cli/commands/review/file/list.rb, line 11 def execute(params = {}) rows = Devpad::API::Review::File.all(params).each_with_index.map do |file, index| locked = file.locked ? 'locked': '' hidden = file.hidden ? 'hidden': '' [index + 1, file.name, file.language, locked, hidden] end @shell.print_table rows @shell.say "(Page #{params['page']})" end