0
0

More than 3 years have passed since last update.

【Rails】Gemを初公開しました。何月なのかを月名で確認するメソッドを生成

Last updated at Posted at 2020-12-04

Gemを初公開しました

ask_year_monthという、

レシーバが何月なのか、

月名でスマートにチェックできるメソッドを生やすGemを公開しました。


月名で確認できなくて地味にモヤッとしたんですよね。


例えば、

Time.current.month == 12
#=> true

よりも、

Time.current.december?
#=> true

のが見やすいよなーという。


ご興味がある方は良かったら使ってみてください。


RubyGems

GitHub

参考記事

RailsプラグインGemの作成方法、RSpecテストまで含めたrails pluginの作り方

【Ruby】gemの作り方から公開まで

gem install に失敗するので https://rubygems.org/ を source に追加した

activesupport/lib/active_support/core_ext

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0