Class: HtmlRB::Tag

Inherits:
Object
  • Object
show all
Defined in:
lib/html_rb.rb

Instance Method Summary collapse

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_sObject



14
15
16
# File 'lib/html_rb.rb', line 14

def to_s
  @strings.join
end