abstract class Pipeline::Command
- Pipeline::Command
- Reference
- Object
Defined in:
pipeline.crConstructors
-
.new
Creates a new command object.
Instance Method Summary
-
#proc(line : String)
Converts single line string.
-
#run(input : IO = ARGF, output : IO = STDOUT, chomp : Bool = true)
Activates command.
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.
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.
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
.