Method: Consular::DSL#setup

Defined in:
lib/consular/dsl.rb

#setup(*commands, &block) ⇒ Object

Run commands using prior to the workflow using the command ‘consular setup`. This allows you to perform any command that needs to be ran prior to setup a particular project/script.

Examples:

setup 'bundle install', 'brew update'
setup { run 'bundle install' }

Parameters:

  • commands (Array<String>)

    Commands to be executed.

  • block (Proc)

    Proc of commands to run.



57
58
59
# File 'lib/consular/dsl.rb', line 57

def setup(*commands, &block)
  block_given? ? run_context(@_setup, &block) : @_setup.concat(commands)
end