Sha256: dedf8f9ab1e13463a8325cb5bfb447301b27e59663633420f616c1548788e673
Contents?: true
Size: 832 Bytes
Versions: 27
Compression:
Stored size: 832 Bytes
Contents
module MasterView module Directives #outputs a block around the text tags, if left bracket count is higher than right #assume that the end is a right bracket otherwise use end class Global_inline_erb < MasterView::DirectiveBase def initialize(attribute_value = nil) super(attribute_value) end def priority DirectivePriorities::Low end def global_directive? true end def stag(dcs) attrs.each do |key, value| replace_with_erb!( value ) end dcs.render end def characters(dcs) replace_with_erb!( data ) dcs.render end private def replace_with_erb!(value) subs = value.gsub!( MasterView::InlineErbSubstitutionRegex, '<%\1%>' ) end end end end
Version data entries
27 entries across 27 versions & 2 rubygems