Created
April 9, 2014 14:40
-
-
Save satococoa/10278136 to your computer and use it in GitHub Desktop.
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 characters
module TagList | |
private | |
def TagList | |
'hoge' | |
end | |
end | |
class Hoge | |
include TagList | |
def some_method | |
# do something... | |
tl = TagList() # クラス内部専用のヘルパみたいに使ってほしい | |
p tl | |
end | |
end | |
hoge = Hoge.new | |
tl = hoge.TagList() # この使い方はされたくない! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment