Answering my question ... yes, it is possible! My problem was this: Snippet methods should be of type NodeSeq => NodeSeq, but CSS Transformations returns a () => CSSSel. CSSSel itself is NodeSeq => NodeSeq, so CSS conversion :() => (NodeSeq => NodeSeq).
This means that to use it with DispatchSnippet, the dispatcher should have the following:
def dispatch: DispatchIt = { case "method1" => normalSnippetMethod _ case "method2" => cssTransform
Basically, I just had an extra _ at the end.
source share