LoginSignup
1
2

More than 5 years have passed since last update.

Railsのmaster branchにdelegate methodをprivateにするオプションが追加されてた

Posted at

ActiveSupportのdelegateしたやmethodをprivateにする方法ないかなーと思ってみてたら、Railsのmasterブランチだとオプション追加されてた。
https://github.com/rails/rails/blob/master/activesupport/lib/active_support/core_ext/module/delegation.rb#L171
delegate :hoge, to: :fuga, private: trueみたいな。

5-2-stableにはなかったのでリリースされるのはまだ先かなぁ。
ちなみにPRは以下。
https://github.com/rails/rails/pull/31933

他にも似たようなissueあがってるんで、リリースされるまでにI/Fかわるかもね。

1
2
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
1
2