{"author_name":"osyo-manga","url":"https://secret-garden.hatenablog.com/entry/2015/08/23/215328","height":"190","version":"1.0","blog_url":"https://secret-garden.hatenablog.com/","categories":["Ruby"],"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fsecret-garden.hatenablog.com%2Fentry%2F2015%2F08%2F23%2F215328\" title=\"Ruby \u306e class/module \u5b9a\u7fa9\u5f0f\u306e\u623b\u308a\u5024 - Secret Garden(Instrumental)\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","published":"2015-08-23 21:53:28","width":"100%","image_url":null,"provider_name":"Hatena Blog","author_url":"https://blog.hatena.ne.jp/osyo-manga/","provider_url":"https://hatena.blog","type":"rich","blog_title":"Secret Garden(Instrumental)","description":"Ruby \u3067\u306f class \u3084 module \u5b9a\u7fa9\u3082\u5f0f\u306a\u306e\u3067\u623b\u308a\u5024\u304c\u3042\u308a\u307e\u3059\u3002 class \u3084 module \u306e\u5b9a\u7fa9\u5f0f\u306e\u623b\u308a\u5024\u306f\u300e\u6700\u5f8c\u306b\u8a55\u4fa1\u3057\u305f\u5f0f\u306e\u7d50\u679c\u300f\u306b\u306a\u308a\u307e\u3059\u3002 # \u6700\u5f8c\u306b\u8a55\u4fa1\u5f0f\u3092\u8fd4\u3059 # \u3053\u306e\u5834\u5408\u306f\u6700\u5f8c\u306b\u5b9a\u7fa9\u3057\u305f\u30e1\u30bd\u30c3\u30c9\u306e\u623b\u308a\u5024\u3092\u8fd4\u3059 result = class X def method1 end def method2 end end p result # => :method2 # module \u3082\u540c\u69d8 result = module M def method1 end # \u6700\u5f8c\u306b\u5f0f\u3092\u8a18\u8ff0\u3059\u308b\u3053\u3068\u3067\u4efb\u610f\u306e\u5024\u3092\u8fd4\u3059\u3053\u3068\u3082\u3067\u304d\u308b 1 + 2 end p result # => 3","title":"Ruby \u306e class/module \u5b9a\u7fa9\u5f0f\u306e\u623b\u308a\u5024"}