Method: TextareaScope#close_scope
- Defined in:
- lib/volt/server/html_parser/textarea_scope.rb
#close_scope(pop = true) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/volt/server/html_parser/textarea_scope.rb', line 12 def close_scope(pop=true) # Remove from the scope @handler.scope.pop attributes = @attributes if @html[/\{[^\}]+\}/] # If the html inside the textarea has a binding, process it as # a value attribute. attributes['value'] = @html @html = '' end # Normal tag attributes = @handler.last.process_attributes('textarea', attributes) @handler.last.html << "<textarea#{attribute_string(attributes)}>#{@html}</textarea>" end |