Class: Rux::DefaultTagBuilder

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

Instance Method Summary collapse

Instance Method Details

#call(tag_name, attributes = {}) ⇒ Object



3
4
5
6
7
# File 'lib/rux/default_tag_builder.rb', line 3

def call(tag_name, attributes = {})
  "<#{tag_name} #{serialize_attrs(attributes)}>" <<
    (block_given? ? Array(yield) : []).join <<
    "</#{tag_name}>"
end