Class Camping::Reloader::App
In: lib/camping/reloader.rb
Parent: (defined?(BasicObject) ? BasicObject : Object)

This is a simple wrapper which causes the script to reload (if needed) on any method call. Then the method call will be forwarded to the app.

Methods

Attributes

app  [RW] 
script  [RW] 

Public Class methods

[Source]

    # File lib/camping/reloader.rb, line 47
47:       def initialize(script)
48:         @script = script
49:       end

Public Instance methods

Reloads if needed, before calling the method on the app.

[Source]

    # File lib/camping/reloader.rb, line 52
52:       def method_missing(meth, *args, &blk)
53:         @script.reload!
54:         @app.send(meth, *args, &blk)
55:       end

[Validate]