Sha256: 249262486cae02f9702da9d02503303b21c1c5379bebc79ac820db0bfa279df9

Contents?: true

Size: 377 Bytes

Versions: 9

Compression:

Stored size: 377 Bytes

Contents

module Mize::Reload
  # Reload this object if a #reload method was provided up somewhere in the
  # inheritance tree, afterwards clear the memoization cache and return self.
  def reload(*)
    Mize::MUTEX.synchronize do
      result = self
      if defined? super
        result = super
      end
      Mize.wrapped.clear
      mize_cache_clear
      result
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
mize-0.6.1 lib/mize/reload.rb
mize-0.6.0 lib/mize/reload.rb
mize-0.5.0 lib/mize/reload.rb
mize-0.4.1 lib/mize/reload.rb
mize-0.4.0 lib/mize/reload.rb
mize-0.3.5 lib/mize/reload.rb
mize-0.3.4 lib/mize/reload.rb
mize-0.3.3 lib/mize/reload.rb
mize-0.3.2 lib/mize/reload.rb