Module: Mize::Reload

Defined in:
lib/mize/reload.rb

Instance Method Summary collapse

Instance Method Details

#reloadObject

Reload this object if a #reload method was provided up somewhere in the inheritance tree, afterwards clear the memoization cache and return self.



4
5
6
7
8
9
10
11
12
13
14
# File 'lib/mize/reload.rb', line 4

def reload(*)
  Mize::MUTEX.synchronize do
    result = self
    if defined? super
      result = super
    end
    Mize.wrapped.clear
    mize_cache_clear
    result
  end
end