Sha256: 19c883c6d8e6cf616006da1b447807fda067b4229731f881ba15f212b0998bfc
Contents?: true
Size: 737 Bytes
Versions: 12
Compression:
Stored size: 737 Bytes
Contents
module Vagrant module Action module Builtin # This class is used to delay execution until the end of # a configured stack class Delayed # @param [Object] callable The object to call (must respond to #call) def initialize(app, env, callable) if !callable.respond_to?(:call) raise TypeError, "Callable argument is expected to respond to `#call`" end @app = app @env = env @callable = callable end def call(env) # Allow the rest of the call stack to execute @app.call(env) # Now call our delayed stack @callable.call(env) end end end end end
Version data entries
12 entries across 12 versions & 3 rubygems