提交 9f1b0b32 编写于 作者: A Aaron Patterson

use attr_reader and alias methods to access instance variables

上级 8bdc1919
......@@ -75,11 +75,6 @@ def proxy_reflection
@reflection
end
# Returns the \target of the proxy, same as +target+.
def proxy_target
@target
end
# Does the proxy or its \target respond to +symbol+?
def respond_to?(*args)
proxy_respond_to?(*args) || (load_target && @target.respond_to?(*args))
......@@ -143,9 +138,10 @@ def stale_target?
end
# Returns the target of this proxy, same as +proxy_target+.
def target
@target
end
attr_reader :target
# Returns the \target of the proxy, same as +target+.
alias :proxy_target :target
# Sets the target of this proxy to <tt>\target</tt>, and the \loaded flag to +true+.
def target=(target)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册