lib/renderers/content_rendering.rb in garterbelt-0.1.0 vs lib/renderers/content_rendering.rb in garterbelt-0.1.1
- old
+ new
@@ -1,10 +1,10 @@
module Garterbelt
module ContentRendering
def self.included(base)
base.class_eval <<-RUBY
- attr_accessor :content
+ attr_accessor :content, :view_escape, :view_style
include InstanceMethods
RUBY
end
@@ -15,13 +15,20 @@
foot
output
end
def head
+ self.view_style = view.render_style
+ self.view_escape = view._escape
+
+ view.render_style = style
+ view._escape = escape
view._level += 1
end
def foot
+ view.render_style = view_style
+ view._escape = view_escape
view._level -= 1
end
def render_content
if content.is_a?(Proc)
\ No newline at end of file