The advantage of having the option to pass symbols/strings as arguments to #then is that it makes it more straighforward for the user to call subsequent methods on the result object chain. Thus the responsibility to convert the symbol into a method object (by using metaprogramming method or an use case alias like apply) is now on the use case class, instead of the client.
At the same time, it is still allowed to pass method objects directly, just as procs, as it was allowed previously, so it doesn't break the api.
As #| (pipe) is basically #then with some small modifications, then it also allows symbols and strings with this PR.
@tiagofsilva thank you very much for your contribution! If be possible, I would like to talk with you. What is the best channel for us to chat? This is the link to my Telegram account: https://t.me/serradura.
Implements the enhancement mentioned in #118
Allows #then method to also receive symbols and strings with the name of the methods. Ex:
The advantage of having the option to pass symbols/strings as arguments to #then is that it makes it more straighforward for the user to call subsequent methods on the result object chain. Thus the responsibility to convert the symbol into a method object (by using metaprogramming
method
or an use case alias likeapply
) is now on the use case class, instead of the client. At the same time, it is still allowed to pass method objects directly, just as procs, as it was allowed previously, so it doesn't break the api. As #| (pipe) is basically #then with some small modifications, then it also allows symbols and strings with this PR.