Class: ActionCommand::PrettyPrintLogAction

Inherits:
Executable
  • Object
show all
Defined in:
lib/action_command/pretty_print_log_action.rb

Overview

Action that parses a log and pretty prints the log, optionally filtering on a particular command sequence.

Instance Attribute Summary collapse

Attributes inherited from Executable

#parent, #test

Class Method Summary collapse

Methods inherited from Executable

#api_context?, #child_context?, #execute, #initialize, #rails_context?, #rake_context?, #root_context, #test_context?, #testing

Constructor Details

This class inherits a constructor from ActionCommand::Executable

Instance Attribute Details

#destObject

return the destination stream, default to STDOUT



19
20
21
# File 'lib/action_command/pretty_print_log_action.rb', line 19

def dest
  @dest
end

#sequenceObject

Returns the value of attribute sequence.



7
8
9
# File 'lib/action_command/pretty_print_log_action.rb', line 7

def sequence
  @sequence
end

#sourceObject

Returns the value of attribute source.



7
8
9
# File 'lib/action_command/pretty_print_log_action.rb', line 7

def source
  @source
end

Class Method Details

.describe_ioObject

specifies the input/output for this command



10
11
12
13
14
15
16
# File 'lib/action_command/pretty_print_log_action.rb', line 10

def self.describe_io
  return ActionCommand.describe_io(self, 'Command that does some logging') do |io|
    io.input(:source, 'Stream to read')
    io.input(:sequence, 'sequence to filter on', OPTIONAL)
    io.input(:dest, 'Optional output stream, defaults to STDOUT', OPTIONAL)
  end
end