pub fn add_class(v: Value, class: Value) -> Result<Value, Error>
Expand description

Add classes to Attribute, a Seq or renderable.

{{ {'data': 'test'}|add_class('bar') }}
  -> class="bar" data="test"
{{ {'data': 'test', 'class': 'bar'}|add_class('foo') }}
  -> class="bar foo" data="test"
{{ {'data': 'test', 'class': ['some', 'other']}|add_class(['foo', 'bar']) }}
  -> class="bar foo other some" data="test"