Thank you for stopping by! I am a full-stack developer that combines the power of entrepreneurship and programming to make the lives of programmers easier.
Thank you for stopping by! I am a full-stack developer that combines the power of entrepreneurship and programming to make the lives of programmers easier.
Thank you for stopping by! I am a full-stack developer that combines the power of entrepreneurship and programming to make the lives of programmers easier.
Interesting. Few languages have this feature. So does that make the
functionan actual method but outside the class?I edited by replacing
functionwithdefkeyword.Basically, instead of making
classas global, use morefunctionsas global primitives.And where do you put these functions?
Put those right in Ruby files. Then when you
requirethat file, you can use your functions.So just one extra file where you put all functions (or methods in this case) related to that class?
my_modules.rb