Class: Vagrant::AptCache::Middleware
- Inherits:
-
Object
- Object
- Vagrant::AptCache::Middleware
- Defined in:
- lib/vagrant-apt_cache/middleware.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, env, options = {}) ⇒ Middleware
constructor
A new instance of Middleware.
Constructor Details
#initialize(app, env, options = {}) ⇒ Middleware
Returns a new instance of Middleware.
5 6 7 8 9 |
# File 'lib/vagrant-apt_cache/middleware.rb', line 5 def initialize(app, env, ={}) @app = app @env = env @options = end |
Instance Method Details
#call(env) ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/vagrant-apt_cache/middleware.rb', line 11 def call(env) @env = env if is_apt_managed? Vagrant::AptCache::RegisterSharedFolder.new(@env[:vm]).run end @app.call(env) end |