<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>lhiroki1205</author_name>
  <author_url>https://blog.hatena.ne.jp/lhiroki1205/</author_url>
  <blog_title>技術ブログ</blog_title>
  <blog_url>https://lhiroki1205.hatenablog.com/</blog_url>
  <categories>
    <anon>Ruby</anon>
  </categories>
  <description>moduleはオブジェクトを作成できない moduleはクラスと異なり、オブジェクトを作成することが出来ません。 例えばこんな時にエラーになります。 module Chatting def hello &quot;hello&quot; end end object = Chatting.new -&gt; NoMethodError 「newなんてメソッドは知りません」と怒られる moduleの基本的な使い方はクラスにincludeして活用します。 class Dog include Chatting end pochi = Dog.new poch.chat =&gt; &quot;hello&quot; って感じで使えます。</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Flhiroki1205.hatenablog.com%2Fentry%2F2019%2F02%2F06%2F101330&quot; title=&quot;moduleはオブジェクトを作成できない - 技術ブログ&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>2019-02-06 10:13:30</published>
  <title>moduleはオブジェクトを作成できない</title>
  <type>rich</type>
  <url>https://lhiroki1205.hatenablog.com/entry/2019/02/06/101330</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
