1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?