I have I file containing:
module BlahA
module BlahB
class Note
def some_method
end
end
end
end
I would like to add a static method to the Note class so I add the following to another file
module BlahA
module BlahB
class Note
def self.some_static_method
end
end
end
end
When I try call it like
BlahA::BlahB::Note.some_static_method
I get
undefined method `some_static_method' for BlahA::BlahB::Note:Class
What am I doing wrong?
To create a static method, you would define it as
And make sure
some_file.rbis required in your file.