Class: ItchRewards::CLI::Commands::Games::List

Inherits:
Dry::CLI::Command
  • Object
show all
Includes:
AuthOptions, Helper
Defined in:
lib/itch_rewards/cli.rb

Instance Method Summary collapse

Methods included from Helper

#authenticated_client, #authenticated_client!, #cli, #color, #objects_to_table, #render_table, #show_rewards

Methods included from AuthOptions

included

Instance Method Details

#call(**options) ⇒ Object



148
149
150
151
152
153
154
# File 'lib/itch_rewards/cli.rb', line 148

def call(**options)
  client = authenticated_client!(options)
  table = objects_to_table(client.game_map.map.values)
  
  cli.say "Games"
  cli.say render_table(table)
end