Class: Htmlrb::Builder

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

Instance Method Summary collapse

Constructor Details

#initialize {|@tag| ... } ⇒ Builder

Returns a new instance of Builder.

Yields:

  • (@tag)


7
8
9
10
# File 'lib/htmlrb/builder.rb', line 7

def initialize
  @tag = Htmlrb::Tag.new
  yield @tag
end

Instance Method Details

#buildObject



12
13
14
# File 'lib/htmlrb/builder.rb', line 12

def build
  @tag.html_parts.join
end