3 ms·
Yes, using Mysite.parse($req, :actions(Mysite::Actions.new)) says "Parse $req using grammar Mysite and actions Mysite::Actions.new." When a token is foun
by colomon 16y ago
Yes, using
Mysite.parse($req, :actions(Mysite::Actions.new))
says "Parse $req using grammar Mysite and actions Mysite::Actions.new." When a token is found, the action method with the same name is called. As I understand it, the idea with separating token and action like that is one grammar can be associated with more than one set of actions.