action.vala 449 B

12345678910111213141516
  1. using Statum;
  2. namespace {{NS}} {
  3. /**
  4. * Sample action scaffolded by `spry add action`. Author a reference with
  5. * `action_registry.author<{{CLASS}}Action>()` in an entrypoint and bind it
  6. * with `stm-action`.
  7. */
  8. public class {{CLASS}}Action : StatumAction {
  9. public override async DirectiveBuilder handle() throws GLib.Error {
  10. return directives().notify("info", "{{CLASS}} handled");
  11. }
  12. }
  13. }