Mod+API+Event
Note: this portion of the API is under development and will be evolving particularly rapidly.
Again this will boil down to a single method call:
event( eventname [, args ] ) &block
Let's look at few examples of how we might use this.
#file: local/packs/mypack/set/type/image.rb
event :create_watermark, :after=>:create do ..... Card.create ... end
The above code (1) applies only to image cards because of the filename (see above), (2) creates a new action called "create_watermark", (3) is immediately called after an image card is created.