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