Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article?
モジュールクラスのオブジェクトの特異メソッド。 モジュールメソッドと呼んで良いのか迷いますが、ここでは、モジュールメソッドと呼んでおきます。 日本語での説明は苦手なので、最初に、何がしたいのかを例として書いておきます。 また長い記事なので、結果だけを知りたい方は、下の方のまとめをご覧ください。 はじめに例 module Hoge def self.hoge puts "hoge" end end Hoge.hoge #=> hoge class Foo include Hoge extend Hoge end Foo.new.hoge #=> undefined method `hoge' for #<Foo:0x0000010105cf60> (NoMethodError) Foo.hoge #=> undefined method `hoge' for Foo:Class (NoMet
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く