Class: HtmlRB::Tag
- Inherits:
-
Object
- Object
- HtmlRB::Tag
- Defined in:
- lib/html_rb.rb
Instance Method Summary collapse
-
#initialize(name = nil, content = nil, **attrs, &block) ⇒ Tag
constructor
A new instance of Tag.
- #to_s ⇒ Object
Constructor Details
#initialize(name = nil, content = nil, **attrs, &block) ⇒ Tag
Returns a new instance of Tag.
9 10 11 12 |
# File 'lib/html_rb.rb', line 9 def initialize(name=nil,content=nil,**attrs,&block) @strings = [] build name, content, **attrs, &block end |
Instance Method Details
#to_s ⇒ Object
14 15 16 |
# File 'lib/html_rb.rb', line 14 def to_s @strings.join end |