class Gitolite::DirtyProxy
Very simple proxy object for checking if the proxied object was modified since the last clean_up! method called. It works correctly only for objects with proper hash method!
Public Class Methods
new(target)
click to toggle source
# File lib/gitolite/dirty_proxy.rb, line 9 def initialize(target) @target = target clean_up! end
Public Instance Methods
clean_up!()
click to toggle source
# File lib/gitolite/dirty_proxy.rb, line 26 def clean_up! @clean_hash = @target.hash end
dirty?()
click to toggle source
# File lib/gitolite/dirty_proxy.rb, line 22 def dirty? @clean_hash != @target.hash end
method_missing(method, *args, &block)
click to toggle source
# File lib/gitolite/dirty_proxy.rb, line 14 def method_missing(method, *args, &block) @target.send(method, *args, &block) end
respond_to?(symbol, include_private=false)
click to toggle source
Calls superclass method
# File lib/gitolite/dirty_proxy.rb, line 18 def respond_to?(symbol, include_private=false) super || [:dirty?, :clean_up!].include?(symbol.to_sym) end