Class: MasterView::Directives::Attr

Inherits:
MasterView::DirectiveBase
  • Object
show all
Defined in:
lib/masterview/directives/attr.rb

Overview

takes the attr_value and parses it as a hash :foo => ‘bar’, :baz => ‘cat’ it sets/overrides the tag’s attribute values for each value. To use erb output simply wrap the content in #{ foo } for example :foo => #product.name

Constant Summary collapse

SubstForErb =

substitution to make it easy to parse erb in attr

'#'+InlineErbStart+'= \1 '+InlineErbEnd+'#'