Module: JpPrefecture::Deprecation
- Defined in:
- lib/jp_prefecture/deprecation.rb
Overview
非推奨機能の告知
Constant Summary collapse
- PREFIX =
'[jp_prefecture] DEPRECATION WARNING:'
Class Method Summary collapse
-
.warn(message) ⇒ void
非推奨の警告を標準エラー出力に出す.
Class Method Details
.warn(message) ⇒ void
This method returns an undefined value.
非推奨の警告を標準エラー出力に出す
Kernel#warn は $VERBOSE が nil のとき (ruby -W0, RUBYOPT=-W0) 何も出力しない。 破壊的変更の告知が届かなくなるため $stderr へ直接書き出す
15 16 17 |
# File 'lib/jp_prefecture/deprecation.rb', line 15 def self.warn() $stderr.puts "#{PREFIX} #{}" # rubocop:disable Style/StderrPuts end |