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

Class Method Summary collapse

Class Attribute Details

.enabled=(value) ⇒ Object (writeonly)

Sets the attribute enabled

Parameters:

  • value

    the value to set the attribute enabled to.



37
38
39
# File 'lib/reloader_interceptor.rb', line 37

def enabled=(value)
  @enabled = value
end

.reloaderClass

Returns A class which inherits ActiveSupport::Reloader.

Returns:

  • (Class)

    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

Returns:

  • (bool)


11
12
13
# File 'lib/reloader_interceptor.rb', line 11

def enabled?
  @enabled
end

.executorClass

Returns A class which inherits ActiveSupport::Executor.

Returns:

  • (Class)

    A class which inherits ActiveSupport::Executor



24
25
26
# File 'lib/reloader_interceptor.rb', line 24

def executor
  reloader.executor
end