lib/express_templates/expander.rb in express_templates-0.3.1 vs lib/express_templates/expander.rb in express_templates-0.3.2

- old
+ new

@@ -19,11 +19,11 @@ end def expand(source=nil, &block) case when block.nil? && source - modified = _wrap_instance_vars( _replace_yield_with_yielder(source) ) + modified = _replace_yield_with_yielder(source) instance_eval(modified, @template.inspect) when block instance_exec &block else raise ArgumentError @@ -88,13 +88,9 @@ private def _replace_yield_with_yielder(source) source.gsub(/(\W)(yield)(\([^\)]*\))?/, '\1 (stack << ExpressTemplates::Markup::Yielder.new\3)') - end - - def _wrap_instance_vars(source) - source.gsub(/(\W)(@\w+)(\W)?/, '\1 (stack << ExpressTemplates::Markup::Wrapper.new("\2") )\3') end class Stack def initialize @stack = [[]] \ No newline at end of file