Project

General

Profile

unexist.dev

subtle

Assorted tidbits and projects

New sublet format

DSL for sublets
Added by Christoph Kappel over 14 years ago

I postponed this update knowing that this will break existing sublets, but it's really worth the hazzle.

Instead of using the class approach I added a DSL which greatly increases the readability of the sublets. This means that older sublets will not be loaded anymore, but every sublet in Sur has been updated accordingly.

Here is a small example for a new sublet:

configure :hello_world do |s|
  s.interval = 120
end

on :run do |s|
  s.data = "Hello, World!" 
end

Sorry, I hope this will limit the problems due migration, besides the improved readability there are many benefits internal for the code.


Comments