Modules
Modules are a way of grouping code into a single namespace.
module ModuleName
def self.functionName()
....
end
def self.anotherOne()
....
end
end
In the example above we have a module containing two functions. We could then call one of the functions using
ModuleName.functionName()
Last updated
Was this helpful?