As advised, I used some code samples in another forum, but it could not improve the problem. My question is the “undefined method `each’ for nil:nilclass” in programs – How to solve it? The command line is:
Home/undefined method
ITtutoria Latest Questions
RubyNb
Asked: April 27, 2022In: ruby
I’m getting this error undefined method `[]’ for nil:nilclass when i run the following code: def extraireAttributs (attributsParam) classeTrouvee = false scanTrouve = false ownerOSTrouve = false ownerAppTrouve = false resultat = Hash.new(0) attributs = Array(attributsParam) attributs.each do |attribut| typeAttribut = attribut['objectTypeAttribute'] [...]