Set an alias for a function

Hello, I was looking for a method to set an alias for a function under my class.

I saw crystal provide an alias function for type, but I didn’t found for function name.

How can I do that ?

No, your best bet would just be define another method that calls the other method. E.g.

def foo
  self.bar
end

def bar
  "bar"
end