Sha256: 556c356d7891320d77308b5aaae6ae6f65f3e42b1bd9d9f8b1dd19c899c8f8e6
Contents?: true
Size: 411 Bytes
Versions: 2
Compression:
Stored size: 411 Bytes
Contents
module VagrantPlugins module Cosmic module Action # This can be used with "Call" built-in to check if the machine # is stopped and branch in the middleware. class IsStopped def initialize(app, env) @app = app end def call(env) env[:result] = env[:machine].state.id == :stopped @app.call(env) end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
vagrant-cosmic-0.2.0 | lib/vagrant-cosmic/action/is_stopped.rb |
vagrant-cosmic-0.1.0 | lib/vagrant-cosmic/action/is_stopped.rb |