Last active
August 29, 2015 14:22
Revisions
-
Masaya Konishi revised this gist
May 29, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,7 +2,7 @@ class Hoge def mmtest hoge #method_missing が呼ばれる => :hoge hoge = 10 #mmtestメソッド内のローカル変数が定義される self.hoge=10 #method_missing が呼ばれる => :hoge= end -
Masaya Konishi created this gist
May 29, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ class Hoge def mmtest hoge #method_missing が呼ばれる => :hoge hoge = 10 #mmtestのローカル変数が定義される self.hoge=10 #method_missing が呼ばれる => :hoge= end def method_missing(method_name, *args) p method_name end end h = Hoge.new h.mmtest