According to the script, it needs to be in an array. Don't know why it was written like that though--it could have easily just been a stand-alone number. It also doesn't make sense why that line would be giving a syntax error. I would have to see all the scripts in the project to draw a conclusion.
def self.<method> is syntax for defining Module methods. Classes use def <method>.
Modules are best used for configuration in scripts. While you could use a class to do the same thing, you would need to initialize an instance of the class every time you wanted to use a method from it. Meanwhile. modules can be accessed and used anywhere.