Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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
Add Comment
Please, Sign In to add comment