Class: ActionCommand::PrettyPrintLogAction
- Inherits:
-
Executable
- Object
- Executable
- ActionCommand::PrettyPrintLogAction
- 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
-
#dest ⇒ Object
return the destination stream, default to STDOUT.
-
#sequence ⇒ Object
Returns the value of attribute sequence.
-
#source ⇒ Object
Returns the value of attribute source.
Attributes inherited from Executable
Class Method Summary collapse
-
.describe_io ⇒ Object
specifies the input/output for this command.
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
#dest ⇒ Object
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 |
#sequence ⇒ Object
Returns the value of attribute sequence.
7 8 9 |
# File 'lib/action_command/pretty_print_log_action.rb', line 7 def sequence @sequence end |
#source ⇒ Object
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_io ⇒ Object
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 |