Method: Exercise::Instructions#after_rendering_run

Defined in:
lib/commands/exercise/instructions.rb

#after_rendering_run(command) ⇒ String

Runs the given command after the current template has been rendered. This is useful for running commands to clean clean up. E.g. stopping a server that was previously started.

Examples:

In ERB template:
<%= after_rendering_run('cic down') %>

Parameters:

  • command (String)

    the command to be run.

Returns:

  • (String)

    the command input parameter is returned so that it can be displayed within a template



31
32
33
34
# File 'lib/commands/exercise/instructions.rb', line 31

def after_rendering_run(command)
  after_rendering_commands << command
  command
end