Ruby-based FSML implementation