Use alias to implement attr method

This commit is contained in:
Yukihiro "Matz" Matsumoto
2017-10-25 01:13:10 +09:00
parent fda64be996
commit 0cf5a0ee37
+4 -3
View File
@@ -5,9 +5,10 @@ class Module
attr_writer(*names)
end
# 15.2.2.4.11
def attr(name)
attr_reader(name)
end
alias attr attr_reader
#def attr(name)
# attr_reader(name)
#end
# 15.2.2.4.27
def include(*args)