Module: ResqueNotify::Server

Defined in:
lib/resque-notify/server.rb

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



13
14
15
16
17
18
19
20
21
22
# File 'lib/resque-notify/server.rb', line 13

def self.included(base)

  base.class_eval do

    get /notify\/public\/([a-z]+\.[a-z]+)/ do
      send_file ResqueNotify::Server.public_path(params[:captures].first)
    end
  end

end

.public_path(filename) ⇒ Object



9
10
11
# File 'lib/resque-notify/server.rb', line 9

def self.public_path(filename)
  File.join(File.dirname(__FILE__), 'server', 'public', filename)
end