Created
July 10, 2024 06:56
-
-
Save wyodeb/8026a265b148c1d8dc68c43cf19bd79a to your computer and use it in GitHub Desktop.
This file contains hidden or 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 Magician | |
def method_missing(name, *args) | |
puts "You tried to call #{name} with these arguments: #{args.join(', ')}" | |
end | |
end | |
magician = Magician.new | |
magician.cast_spell("fireball", "enemy") # You tried to call cast_spell with these arguments: fireball, enemy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment