Access Formula methods in cask?

How can I access a formula method within a cask? Specifically inreplace