109
110
111
112
113
114
115
116
117
118
119
120
121
|
# File 'lib/fortitude/rendering_context.rb', line 109
def emitting_tag!(widget, tag_object, content_or_attributes, attributes)
validate_element_for_rules(widget, tag_object) if widget.class.enforce_element_nesting_rules
@current_element_nesting << tag_object
begin
yield
ensure
last = @current_element_nesting.pop
unless last.equal?(tag_object)
raise "Something horrible happened -- the last tag we started was #{last}, but now we're ending #{tag_object}?!?"
end
end
end
|