LoginSignup
7
5

More than 5 years have passed since last update.

ruby で標準エラー出力に pp する

Posted at

こんにちは,久しぶりにバッチを書いている @isseium です.

とあるバッチを作っていて標準エラー出力にppしたくなりました.
調べたらこんな感じでした.

PP.pp("出力したいメッセージ", STDERR)

もっとクールな方法があれば教えてほしいです.

ついでに

ppのドキュメントを読むと第三引数で表示幅も変えられるっぽいですね.

pp(obj, out = $>, width = 79) -> object

参考

7
5
2

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
7
5