Class: Wee::Brush::StyleTag
- Inherits:
-
GenericTagBrush
- Object
- Wee::Brush
- GenericTagBrush
- Wee::Brush::StyleTag
- Defined in:
- lib/wee/html_brushes.rb
Constant Summary collapse
- HTML_TAG =
'style'.freeze
Constants inherited from GenericTagBrush
Instance Attribute Summary
Attributes inherited from Wee::Brush
Instance Method Summary collapse
-
#initialize ⇒ StyleTag
constructor
A new instance of StyleTag.
- #with(text = nil, &block) ⇒ Object
Methods inherited from GenericTagBrush
#callback_on, #get_oid, html_attr, #javascript_on, #oid, #onclick_callback, #onclick_javascript, #ondblclick_callback, #update_component_on, #update_on
Methods inherited from Wee::Brush
Constructor Details
Instance Method Details
#with(text = nil, &block) ⇒ Object
224 225 226 227 228 229 230 231 232 |
# File 'lib/wee/html_brushes.rb', line 224 def with(text=nil, &block) @document.start_tag(@tag, @attributes) @document.write("<!--\n") @document.text(text) if text @canvas.nest(&block) if block @document.write("-->\n") @document.end_tag(@tag) @document = @canvas = nil end |