module MasterView module Directives class Link_to_if < MasterView::DirectiveBase def stag(dcs) end def etag(dcs) args = parse_attr_value condition = args[0] remove_strings_from_attr_value! a = [] a << 'link_to_if '+condition a << quote(content_str) a << attr_value unless attr_value.strip.empty? self.content='' erb_content(a.join(', ')) end end end end