Add toggle defs
Allow method= in Ruby rules.

Also added a number of tests around the ruby rules.