I've frequently done this with success:
{if '{exp:my_plugin:my_method}'}My method returned true{/if}
Or the opposite also works:
{if '{exp:my_plugin:my_method}' == '0'}My method returned false{/if}
However, doing this for methods with dynamic parameters that also return a string instead of a boolean seems to be impossible - eg (inside of a channel entries tag):
{if '{exp:my_plugin:my_method entry_id="{entry_id}"}' == 'blah'}My method returned the word blah{/if}
Interestingly, calling the plugin outside the conditional at least once in the same template makes the conditional work as expected:
test output: {exp:my_plugin:my_method entry_id="{entry_id}"}
{if '{exp:my_plugin:my_method entry_id="{entry_id}"}' == 'blah'}My method returned the word blah{/if}
... but this is obviously far too weird and fragile to be useful!
Wondering if I'm missing something obvious or making a mistake?