週刊Railsウォッチ(20191029)で取り上げたhumanize gemに日本語ロケールを追加して数値を漢数字読みの数詞に変換できるようにしてみました。 humanize gemについて リポジトリ: radar/humanize: Takes your numbers and makes them *fancy*. レシーバーの数値を読み上げ可能な文字列に変換します。デフォルトロケールは英語です。 require 'humanize' (1000..1050).to_a.map(&:humanize) => ["one thousand", "one thousand and one", "one thousand and two", "one thousand and three", "one thousand and four", "one thousand and five"
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く