Advertisement
Guest User

Untitled

a guest
May 27th, 2015
285
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. class File
  2.  
  3. def initialize(inode: nil, path: nil)
  4. @inode = inode
  5. @path = path
  6. end
  7.  
  8. attr_reader :inode
  9. attr_reader :path
  10.  
  11. def checkNode(inode)
  12. return @inode == inode
  13. end
  14. end
  15.  
  16. class Files
  17.  
  18. def initialize(dirPath)
  19. @dirPath = dirPath
  20. end
  21.  
  22. attr_reader :dirPath
  23. end
  24.  
  25. def splitDir(dirList)
  26. retArr = []
  27. dirArray = dirList.split(",")
  28. dirArray.each do |dir|
  29. retArr.push(Files.new(dir))
  30. end
  31. return retArr
  32. end
  33.  
  34.  
  35. Compilation error is:
  36. /CFiles.rb:3:in `initialize': wrong number of arguments (1 for 0) (ArgumentError)
  37. from /var/lib/gems/2.1.0/gems/parseconfig-1.0.6/lib/parseconfig.rb:56:in `open'
  38. from /var/lib/gems/2.1.0/gems/parseconfig-1.0.6/lib/parseconfig.rb:56:in `import_config'
  39. from /var/lib/gems/2.1.0/gems/parseconfig-1.0.6/lib/parseconfig.rb:38:in `initialize'
  40. from ./MMain.rb:7:in `new'
  41. from ./MMain.rb:7:in `<main>'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement