Class: Alki::Reload::Reloader
- Inherits:
-
Object
- Object
- Alki::Reload::Reloader
- Defined in:
- lib/alki/reload/reloader.rb
Instance Attribute Summary collapse
-
#hooks ⇒ Object
readonly
Returns the value of attribute hooks.
Instance Method Summary collapse
-
#initialize(unloader) ⇒ Reloader
constructor
A new instance of Reloader.
- #reload ⇒ Object
Constructor Details
#initialize(unloader) ⇒ Reloader
Returns a new instance of Reloader.
6 7 8 9 |
# File 'lib/alki/reload/reloader.rb', line 6 def initialize(unloader) @unloader = unloader @hooks = [] end |
Instance Attribute Details
#hooks ⇒ Object (readonly)
Returns the value of attribute hooks.
4 5 6 |
# File 'lib/alki/reload/reloader.rb', line 4 def hooks @hooks end |
Instance Method Details
#reload ⇒ Object
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/alki/reload/reloader.rb', line 11 def reload unloadable = @unloader.find_unloadable if unloadable hooks.each &:call @unloader.unload unloadable true else false end end |