Skip to content

Instantly share code, notes, and snippets.

@peterbe
Created February 5, 2024 21:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save peterbe/35c73283aa43eeb54bdd816f3d37d656 to your computer and use it in GitHub Desktop.
Save peterbe/35c73283aa43eeb54bdd816f3d37d656 to your computer and use it in GitHub Desktop.
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