Created
February 5, 2024 21:48
-
-
Save peterbe/35c73283aa43eeb54bdd816f3d37d656 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class TestClass | |
def self.some_method | |
puts "A class method" | |
new.some_method | |
end | |
def some_method | |
puts "My instance method" | |
end | |
end | |
TestClass.some_method # prints "A class method" and "My instance method" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment