shoes/shoes4 — pull request #227 by arnebrasseur (2013-04-07 19:06:29+00:00)
Title: Fix the edit_box DSL method to optionally take a string of text.

Finally made time to wrap/clean this up :)

This had some collateral effects. It seems there are quite a few DSL methods that
should take one or more optional arguments, apart from their style/options hash.
I imagine the work of detecting/extracting these arguments would be done in
ElementMethods, so the constructors of the actual elements take a fixed number
of arguments, of which one or more can be nil.

Because of this, some mechanisms will be needed in ElementMethods to
differentiate the various invocations, and so as a first step I added an
extract_options! which does the usual thing.

There were also no specs in place yet for this DSL layer in ElementMethods. I
created pending specs, and implemented the full behaviour of edit_box, which
can be a nice example for the others, and excellent low hanging fruit for
whoever wants to get their feet wet.

There's a pun in there somewhere. Feet, shoes, wet... :shoe: :mans_shoe: :sandal: :boot: :high_heel: :swimmer: