abstract class Pipeline::Command

Defined in:

pipeline.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new #

Creates a new command object.

If you want to override or overload #initialize method, you must call super(&block) to set flags for the internal option parser object in it, even when no flag will be set.


[View source]

Instance Method Detail

abstract def proc(line : String) #

Converts single line string.

This method will be called from #run method for each line from input IO.


[View source]
def run(input : IO = ARGF, output : IO = STDOUT, chomp : Bool = true) #

Activates command.

This reads each line from input and converts it with #proc. When converted line is not nil, it will be put to output.


[View source]