<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>rhysd</author_name>
  <author_url>https://blog.hatena.ne.jp/rhysd/</author_url>
  <blog_title>はやくプログラムになりたい</blog_title>
  <blog_url>https://rhysd.hatenablog.com/</blog_url>
  <categories>
    <anon>Ruby</anon>
  </categories>
  <description>元ネタは Homebrew の String#undent メソッドです． ここで紹介するものはそれを少し賢くしています． class String def undent min_space_num = self.split(&quot;\n&quot;).delete_if{|s| s=~ /^\s*$/ }.map{|s| s[/^\s+/].length }.min gsub(/^[ \t]{,#{min_space_num}}/, '') end end Ruby のヒアドキュメントは， class Notifier def warning &lt;&lt;-EOS This is warning. your act…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Frhysd.hatenablog.com%2Fentry%2F20120614%2F1339697132&quot; title=&quot;ヒアドキュメントを便利にする String#undent メソッド - はやくプログラムになりたい&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2012-06-14 03:05:32</published>
  <title>ヒアドキュメントを便利にする String#undent メソッド</title>
  <type>rich</type>
  <url>https://rhysd.hatenablog.com/entry/20120614/1339697132</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
