Class: BunBun::CLI::Countries

Inherits:
Command
  • Object
show all
Defined in:
lib/bunbun/cli/countries.rb

Instance Attribute Summary

Attributes inherited from Command

#options

Instance Method Summary collapse

Methods inherited from Command

argument_count, argument_names, option, #option_parser, options

Instance Method Details

#callObject



4
5
6
7
8
9
10
11
# File 'lib/bunbun/cli/countries.rb', line 4

def call
  items = client.country.list

  print_table(items) do |t|
    t.add_column('Name', align_header: :left) { _1['Name'] }
    t.add_column('Code', align_header: :left) { _1['IsoCode'] }
  end
end