Module: FunWith::Patterns::ClassReloaderMethod

Included in:
Reloadable
Defined in:
lib/fun_with/patterns/reloadable.rb

Instance Method Summary collapse

Instance Method Details

#reload_class(klass) ⇒ Object



25
26
27
28
29
30
# File 'lib/fun_with/patterns/reloadable.rb', line 25

def reload_class( klass )
  if file = klass.reloader_filepath
    Object.send( :remove_const, klass.name.to_sym )
    file.load
  end
end