# require_context

Optional

This directive can be used in any imported runfile to require that the importing runfile needs to provide these context variables. When used with the additional default: 'value' argument, this value will be used in case the importing runfile did not provide a value.

title  'DevOps Tools'

import 'server', cloud: 'azure'
title  'Server Commands'

require_context :cloud, default: 'aws'

action 'deploy' do
  say "Deploying to #{context[:cloud]}"
end
$ run
Usage:
  run server
  run [COMMAND] (--help | -h)

$ run server
Usage:
  run server deploy
  run server (--help | -h)

$ run server deploy
Deploying to azure