Engine: access to url_helpers otside view/controller

I use Engine.
How to get access to url_helpers, such as <name>_path or _<name>_url, in
a separate class? In application it simple:
Rails.application.routes.url_helpers.<name>_path

But how to get access to url_helpers in Engine? When I use
Rails.application.routes.url_helpers.root_path, then I get '/', root of
Application. Other helpers for Engine aren't not defined. Also
Rails.my_engine.routes.url_helpers.root_path fails.