<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>eswai</author_name>
  <author_url>https://blog.hatena.ne.jp/eswai/</author_url>
  <blog_title>weblog.sy</blog_title>
  <blog_url>https://eswai.hatenablog.com/</blog_url>
  <categories>
  </categories>
  <description>concurrent-rubyをつかうとfutureパターンが、かなりきれいに書ける。 github.com require 'concurrent-edge' Concurrent.future { raise &quot;exception&quot; if [true, false].sample true }.then {|m| puts &quot;succeed #{m}&quot; # 成功した時の処理、viewになげたり }.rescue{|m| puts &quot;failed #{m}&quot; # 失敗した時の処理 }.then{|m| puts &quot;finished&quot; # finalize } sleep 0.1</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Feswai.hatenablog.com%2Fentry%2F2016%2F04%2F10%2F063806&quot; title=&quot;Futureパターン2 - weblog.sy&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>2016-04-10 06:38:06</published>
  <title>Futureパターン2</title>
  <type>rich</type>
  <url>https://eswai.hatenablog.com/entry/2016/04/10/063806</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
