Sha256: 5a148db4ad9fdbcca995b2ea554f2b675b0d846aa28f5bb26d7dfda82a972fa2
Contents?: true
Size: 505 Bytes
Versions: 2
Compression:
Stored size: 505 Bytes
Contents
module Jjjaaa class Middleware def initialize(app) @app = app end def call(env) job = fork do exec "afplay #{jjjaaa}" end Process.detach job @app.call(env) end private def path Pathname.new File.expand_path File.dirname(__FILE__) end def lib path.parent end def base lib.parent end def sounds base.join "sounds" end def jjjaaa sounds.join "jjjaaa.m4a" end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
jjjaaa-1.0.0 | lib/jjjaaa/middleware.rb |
jjjaaa-0.0.1 | lib/jjjaaa/middleware.rb |