Class: CommandExec::Formatter::String

Inherits:
Array
  • Object
show all
Defined in:
lib/command_exec/formatter/string.rb

Overview

Style as simple string

Instance Attribute Summary

Attributes inherited from Array

#logger

Instance Method Summary collapse

Methods inherited from Array

#initialize, #status

Methods included from CommandExec::FieldHelper

#end_time, #executable, #initialize, #log_file, #pid, #reason_for_failure, #return_code, #start_time, #stderr, #stdout

Constructor Details

This class inherits a constructor from CommandExec::Formatter::Array

Instance Method Details

#output(*fields) ⇒ String

convert the prepared output to single string

Parameters:

  • fields (Array, Symbol)

    the fields which should be outputted

Returns:

  • (String)

    the output formatted as simple string



17
18
19
# File 'lib/command_exec/formatter/string.rb', line 17

def output(*fields)
  prepare_output(fields.flatten).join("\n")
end