{"image_url":null,"blog_url":"https://pebble8888.hatenablog.com/","width":"100%","author_url":"https://blog.hatena.ne.jp/pebble8888/","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fpebble8888.hatenablog.com%2Fentry%2F2015%2F04%2F09%2F001455\" title=\"ruby\u6587\u6cd5\u305d\u306e\uff12 - Pebble Coding\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","description":"Module\u306e\u4f7f\u3044\u65b9\u3002 \u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306bMyMathModule.rb\u3068MyApp.rb\u306e\uff12\u3064\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u3066\u307f\u308b\u3002 # MyMathModule.rb module MyMathModule def plus(x, y) x + y end end # MyApp.rb require \"./MyMathModule\" class MyApp include MyMathModule end myapp = MyApp.new p myapp.plus(1,2) \u30b7\u30a7\u30eb\u304b\u3089\u6b21\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u307f\u308b\u3002 $ ruby MyApp.rb 3 \u3053\u308c\u304cruby\u306emodule\u306e\u4e00\u822c\u7684\u306a\u4f7f\u3044\u65b9\u3067\u3042\u308b\u3002\u2026","author_name":"pebble8888","version":"1.0","published":"2015-04-09 00:14:55","provider_name":"Hatena Blog","provider_url":"https://hatena.blog","title":"ruby\u6587\u6cd5\u305d\u306e\uff12","blog_title":"Pebble Coding","url":"https://pebble8888.hatenablog.com/entry/2015/04/09/001455","height":"190","type":"rich","categories":["rails/ruby"]}