mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
lazy_object: fix __getobj__ signature
This commit is contained in:
parent
080ade602a
commit
6403d1379e
@ -9,17 +9,15 @@ class LazyObject < Delegator
|
|||||||
super(callable)
|
super(callable)
|
||||||
end
|
end
|
||||||
|
|
||||||
def __getobj__
|
def __getobj__(&)
|
||||||
return @__getobj__ if defined?(@__getobj__)
|
return @__getobj__ if defined?(@__getobj__)
|
||||||
|
|
||||||
@__getobj__ = @__callable__.call
|
@__getobj__ = @__callable__.call
|
||||||
end
|
end
|
||||||
private :__getobj__
|
|
||||||
|
|
||||||
def __setobj__(callable)
|
def __setobj__(callable)
|
||||||
@__callable__ = callable
|
@__callable__ = callable
|
||||||
end
|
end
|
||||||
private :__setobj__
|
|
||||||
|
|
||||||
# Forward to the inner object to make lazy objects type-checkable.
|
# Forward to the inner object to make lazy objects type-checkable.
|
||||||
#
|
#
|
||||||
|
Loading…
x
Reference in New Issue
Block a user