<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>craftone</author_name>
  <author_url>https://blog.hatena.ne.jp/craftone/</author_url>
  <blog_title>craftoneの日記</blog_title>
  <blog_url>https://craftone.hatenablog.com/</blog_url>
  <categories>
    <anon>Ruby</anon>
  </categories>
  <description>ごくごくフツーに書くとtestしづらいので、無理矢理class化する。 class部とコマンド部を１ファイルにしておくと、rspecのパース時か何かにおかしくなるので、別ファイルにする。 #lib/MyCommand.rb class MyCommand def main(args) # ARGVをrspecでテストできるように、メソッドの引数でARGVを設定できるようにする。 ARGV.clear args.each{|file_name| ARGV &lt;&lt; file_name} #引数エラーのとき。 raise ArgumentError if 〜〜 #メイン処理 end end #MyCo…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fcraftone.hatenablog.com%2Fentry%2F20080514%2F1210725788&quot; title=&quot;Rubyコマンド作成雛形 - craftoneの日記&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>2008-05-14 09:43:08</published>
  <title>Rubyコマンド作成雛形</title>
  <type>rich</type>
  <url>https://craftone.hatenablog.com/entry/20080514/1210725788</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
