<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>karlley_jp</author_name>
  <author_url>https://blog.hatena.ne.jp/karlley_jp/</author_url>
  <blog_title>時々とおまわり</blog_title>
  <blog_url>https://karlley.hatenablog.jp/</blog_url>
  <categories>
    <anon>Ruby</anon>
  </categories>
  <description>結論 ブロック処理をより完結に書ける記法。 インスタンス.{ |ブロックパラメータ| ブロックパラメータ.メソッド名 } を(&amp;:メソッド名) で書ける &amp;:メソッド名 で記述するには特定の条件がある 通称は「あんころ」らしい。 記述例 文字列の入った配列をupcase メソッドで大文字化する処理です。 ブロックを使った記述をを&amp;: で置き換えることができます。 # ブロック使った記述 [&quot;a&quot;,&quot;b&quot;,&quot;c&quot;].map{ |s| s.upcase } =&gt; [&quot;A&quot;, &quot;B&quot;, &quot;C&quot;] # &amp;:を使った記述 [&quot;a&quot;,&quot;b&quot;,&quot;c&quot;].map(&amp;:upcase) =&gt; [&quot;A&quot;, &quot;B&quot;,…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fkarlley.hatenablog.jp%2Fentry%2F2023%2F12%2F07%2F105253&quot; title=&quot;Rubyの&amp;amp;:の意味 - 時々とおまわり&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>2023-12-07 10:52:53</published>
  <title>Rubyの&amp;:の意味</title>
  <type>rich</type>
  <url>https://karlley.hatenablog.jp/entry/2023/12/07/105253</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
