エントリーの編集
エントリーの編集は全ユーザーに共通の機能です。
必ずガイドラインを一読の上ご利用ください。
記事へのコメント1件
- 注目コメント
- 新着コメント
注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています
- バナー広告なし
- ミュート機能あり
- ダークモード搭載
関連記事
文字列をインデントするメソッド - Qiita
class String def indent(level = 1, count = 2) spaces = ' ' * count * level each_line.map {|line| ... class String def indent(level = 1, count = 2) spaces = ' ' * count * level each_line.map {|line| line.chomp.empty? ? line : spaces + line }.join end end <<CONFIG.indent MyApp.configure do |app| # ... end CONFIG # MyApp.configure do |app| # # ... # end
2012/09/12 リンク