<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>osyo-manga</author_name>
  <author_url>https://blog.hatena.ne.jp/osyo-manga/</author_url>
  <blog_title>Secret Garden(Instrumental)</blog_title>
  <blog_url>https://secret-garden.hatenablog.com/</blog_url>
  <categories>
    <anon>Ruby</anon>
  </categories>
  <description>一人 Ruby Advent Calendar 2017 19日目の記事になります。 前回、トップレベルのメソッドの扱いについて書いたのですが、今回は変数に関してです。 トップレベルのローカル変数 トップレベルで定義されたローカル変数は通常のローカル変数と同じような感じで使えます。 homu = &quot;homu&quot; def func homu end # 関数内からは参照できない # Error: undefined local variable or method `homu' for main:Object (NameError) # p func # 関数内で参照する場合はブロックを使ってキャ…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fsecret-garden.hatenablog.com%2Fentry%2F2017%2F12%2F19%2F160858&quot; title=&quot;【一人 Ruby Advent Calendar 2017】トップレベルの変数の扱い【19日目】 - Secret Garden(Instrumental)&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>2017-12-19 16:08:58</published>
  <title>【一人 Ruby Advent Calendar 2017】トップレベルの変数の扱い【19日目】</title>
  <type>rich</type>
  <url>https://secret-garden.hatenablog.com/entry/2017/12/19/160858</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
