Class: RbEAI::AwkScript
Direct Known Subclasses
Instance Method Summary collapse
- #doTransform(file, newfilename) ⇒ Object
-
#initialize(node) ⇒ AwkScript
constructor
A new instance of AwkScript.
Methods inherited from Script
Constructor Details
#initialize(node) ⇒ AwkScript
Returns a new instance of AwkScript.
96 97 98 99 |
# File 'lib/rbeai/TransfLogic.rb', line 96 def initialize(node) super(node) @separator = (sep = node.attributes["separator"])!= nil ? "-F "+sep : "" end |
Instance Method Details
#doTransform(file, newfilename) ⇒ Object
101 102 103 104 |
# File 'lib/rbeai/TransfLogic.rb', line 101 def doTransform(file, newfilename) print "gawk -f #{@script} #{@separator} #{@file} > #{newfilename} \n" result = system("gawk -f #{@script} #{@separator} #{file} > #{newfilename}") end |