mirror of
https://github.com/urbit/shrub.git
synced 2024-12-21 01:41:37 +03:00
37 lines
578 B
Plaintext
37 lines
578 B
Plaintext
/+ default-agent, verb, dbug
|
|
::
|
|
=| state=~
|
|
%- agent:dbug
|
|
%+ verb &
|
|
^- agent:gall
|
|
|_ =bowl:gall
|
|
+* this .
|
|
def ~(. (default-agent this %|) bowl)
|
|
::
|
|
++ on-poke
|
|
|= [=mark =vase]
|
|
(on-poke:def +<)
|
|
::
|
|
++ on-watch
|
|
|= =path
|
|
`this
|
|
::
|
|
++ on-agent
|
|
|= [=wire =sign:agent:gall]
|
|
(on-agent:def +<)
|
|
::
|
|
++ on-fail
|
|
|= [=term =tang]
|
|
(mean ':pub +on-fail' term tang)
|
|
::
|
|
++ on-leave
|
|
|= =path
|
|
`this
|
|
::
|
|
++ on-init `this
|
|
++ on-save !>(state)
|
|
++ on-load |=(old=vase `this(state !<(_state old)))
|
|
++ on-arvo on-arvo:def
|
|
++ on-peek on-peek:def
|
|
--
|