Skip to content

Instantly share code, notes, and snippets.

@Riduidel
Created December 30, 2009 13:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Riduidel/266029 to your computer and use it in GitHub Desktop.
Save Riduidel/266029 to your computer and use it in GitHub Desktop.
def loadSignature(_signatureFileName)
sigFile = File.open(_signatureFileName)
if sigFile==nil
puts "Cannot open file "+_signatureFileName
else
sigText = ""
# parses file
sigFile.each do |line|
line.strip!
lineLength = line.size
if lineLength==0
# The signature text is constructed, now we need a Signature object
@signatures.push(Signature.new(sigText, self))
elsif line.index("--")==0
sigText = line+"\ "
else
sigText+=line+"\ "
end
end
sigFile.close
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment