Every time I use my Semantic Attributes plugin on a new project, especially on a project with other people, I want to try and make it better. In my last commits, I’ve cleaned up the class namespacing and trimmed out some dead weight.
New Syntax Shortcuts
I’ve added some shortcuts to make declaring attributes a bit simpler. In one shot, the changes can be expressed as:
email_address_is_email :or_empty => false,
:validate_if => :email_required?becomes:
email_address_is_required_email :if => :email_required?Note that the old syntax still works just fine. Nothing should break.
New Reference Sheet
I try and keep the rDoc clean, but today I took the time to put everything I want to know in one document: