msz/hammox

`protect` all functions from behaviour by default

msz opened this issue · 5 comments

msz commented
`protect` all functions from behaviour by default
msz commented

#54 added protect/1 for behaviour-implementation modules but not closing this just yet as it would be good to also add a protect/2 version for when the behaviour and implementation modules are different modules. cc @saneery if you'd like to tackle this too

Sure! you may assign the issue to me

@msz should we return exceptions then some function inside the implementation module doesn't have specs? Or decorate only those with specs?
The second seems is more reasonable to me

msz commented

Often the implementation module will be much larger than a behaviour, and can actually implement several behaviours and still have its own functions. So I think if we are protecting with a specific behaviour, we should only look at callbacks from that behaviour.

msz commented

Closed in #55.