Guest User

Untitled

a guest
Apr 26th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. def loadSignature(_signatureFileName)
  2. sigFile = File.open(_signatureFileName)
  3. if sigFile==nil
  4. puts "Cannot open file "+_signatureFileName
  5. else
  6. sigText = ""
  7. # parses file
  8. sigFile.each do |line|
  9. line.strip!
  10. lineLength = line.size
  11. if lineLength==0
  12. # The signature text is constructed, now we need a Signature object
  13. @signatures.push(Signature.new(sigText, self))
  14. elsif line.index("--")==0
  15. sigText = line+"\ "
  16. else
  17. sigText+=line+"\ "
  18. end
  19. end
  20. sigFile.close
  21. end
  22. end
Add Comment
Please, Sign In to add comment