Class: JaPrefecture::CLI::Command

Inherits:
Thor
  • Object
show all
Defined in:
lib/ja_prefecture/cli/command.rb

Instance Method Summary collapse

Instance Method Details

#listObject



8
9
10
11
12
13
# File 'lib/ja_prefecture/cli/command.rb', line 8

def list
  PREFECTURE_MAP.map do |k, v|
    suffix = IRREGULAR_SUFFIX_MAP.has_key?(k.to_sym) ? IRREGULAR_SUFFIX_MAP[k.to_sym] : ""
    puts v[:name].to_s + suffix.to_s
  end
end