Module: ReloaderInterceptor
- Defined in:
- lib/reloader_interceptor.rb,
lib/reloader_interceptor/version.rb,
lib/reloader_interceptor/wrapper.rb,
lib/reloader_interceptor/server_interceptor.rb
Defined Under Namespace
Classes: ServerInterceptor, Wrapper
Constant Summary collapse
- VERSION =
"0.0.3"
Class Attribute Summary collapse
-
.enabled ⇒ Object
writeonly
Sets the attribute enabled.
-
.reloader ⇒ Class
A class which inherits ActiveSupport::Reloader.
Class Method Summary collapse
- .disable! ⇒ Object
- .enable! ⇒ Object
- .enabled? ⇒ bool
-
.executor ⇒ Class
A class which inherits ActiveSupport::Executor.
Class Attribute Details
.enabled=(value) ⇒ Object (writeonly)
Sets the attribute enabled
37 38 39 |
# File 'lib/reloader_interceptor.rb', line 37 def enabled=(value) @enabled = value end |
.reloader ⇒ Class
Returns A class which inherits ActiveSupport::Reloader.
29 30 31 32 33 34 35 |
# File 'lib/reloader_interceptor.rb', line 29 def reloader @reloader ||= begin r = Class.new(ActiveSupport::Reloader) r.executor = Class.new(ActiveSupport::Executor) r end end |
Class Method Details
.disable! ⇒ Object
19 20 21 |
# File 'lib/reloader_interceptor.rb', line 19 def disable! @enabled = false end |
.enable! ⇒ Object
15 16 17 |
# File 'lib/reloader_interceptor.rb', line 15 def enable! @enabled = true end |
.enabled? ⇒ bool
11 12 13 |
# File 'lib/reloader_interceptor.rb', line 11 def enabled? @enabled end |
.executor ⇒ Class
Returns A class which inherits ActiveSupport::Executor.
24 25 26 |
# File 'lib/reloader_interceptor.rb', line 24 def executor reloader.executor end |