ValidForm::XMLAttributes (Module)

In: ValidForm_html.rb

A wrapper module for the hashes_toattributes method.

Methods

Public Instance methods

Takes one or more hashes as arguments. Returns a string of space-delimited key="value" pairs, where value has had HTML entities escaped.

Keys and Values which are nil or an empty string are not included in the output.

  attributes = { :style=>'font-weight:bold; color:orange', :size=>12 }
  hashes_toattributes( {'id'=>'foo', :name=>'bar'},attributes )
   => ' id="foo" name="bar" size="12" style="font-weight:bold; color:orange"'

[Validate]