vaguerent/lib/vagrant/actions/middleware_stack.rb
2010-07-03 17:34:15 +02:00

23 lines
513 B
Ruby

module Vagrant
module Actions
# Represents a middleware stack for Vagrant actions. Vagrant
# actions are created and can be extended with middlewares.
#
# The exact nature of how this will work is not set in stone.
class MiddlewareStack
# Initializes the middleware stack with the given name.
def initialize(key)
@stack = []
end
def use(klass)
@stack << klass
end
def run(endpoint)
@stack << endpoint
end
end
end
end