Class: Useless::Rack::FS

Inherits:
Object
  • Object
show all
Defined in:
lib/useless/rack/fs.rb

Overview

‘Rack::FS` adds the Useless.fs instance to the env as ’useless.fs’.

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ FS

Returns a new instance of FS.



7
8
9
# File 'lib/useless/rack/fs.rb', line 7

def initialize(app)
  @app = app
end

Instance Method Details

#call(env) ⇒ Object



11
12
13
14
# File 'lib/useless/rack/fs.rb', line 11

def call(env)
  env['useless.fs'] = Useless.fs
  @app.call(env)
end