Class: Cheetah::Recorder Abstract

Inherits:
Object
  • Object
show all
Defined in:
lib/cheetah.rb

Overview

This class is abstract.

Defines a recorder interface. Recorder is an object that handles recording of the command execution into a logger. It decides what exactly gets logged, at what level and using what messages.

Direct Known Subclasses

DefaultRecorder, NullRecorder

Instance Method Summary collapse

Instance Method Details

#record_commands(commands) ⇒ Object

This method is abstract.

Called to record the executed commands.

Parameters:

  • commands (Array<Array<String>>)

    the executed commands as an array where each item is again an array containing an executed command in the first element and its arguments in the remaining ones



92
# File 'lib/cheetah.rb', line 92

abstract_method :record_commands

#record_status(status) ⇒ Object

This method is abstract.

Called to record the executed command exit status.

Parameters:

  • status (Process::Status)

    the executed command exit status

  • allowed_status (Boolean)

    whether the exit code is in the list of allowed exit codes



125
# File 'lib/cheetah.rb', line 125

abstract_method :record_status

#record_stderr(stderr) ⇒ Object

This method is abstract.

Called to record part of the output the executed command wrote to stderr.

Parameters:

  • stderr (String)

    part of the output the executed command wrote to stderr



117
# File 'lib/cheetah.rb', line 117

abstract_method :record_stderr

#record_stdin(stdin) ⇒ Object

This method is abstract.

Called to record part of the executed command input.

Parameters:

  • stdin (String)

    part of the executed command input



99
# File 'lib/cheetah.rb', line 99

abstract_method :record_stdin

#record_stdout(stdout) ⇒ Object

This method is abstract.

Called to record part of the output the executed command wrote to stdout.

Parameters:

  • stdout (String)

    part of the output the executed command wrote to stdout



108
# File 'lib/cheetah.rb', line 108

abstract_method :record_stdout