Module: BBLib::HTML

Defined in:
lib/bblib/html/tag.rb,
lib/bblib/html/builder.rb,
lib/bblib/html/tag_set.rb

Defined Under Namespace

Modules: Builder Classes: Tag, TagSet

Constant Summary collapse

TAGS =
%w{a abbr address area article aside audio b base bdi bdo blockquote body br button canvas caption cite code col colgroup command datalist dd del details dfn div dl dt em embed fieldset figcaption figure footer form h1 h2 h3 h4 h5 h6 head header hgroup hr html i iframe img input ins kbd keygen label legend li link map mark menu meta meter nav noscript object ol optgroup option output p param pre progress q rp rt ruby s samp script section select small source span strong style sub summary sup table tbody td textarea tfoot th thead time title tr track u ul var video wbr}
SELF_CLOSING_TAGS =
%w{area base br col command embed hr img input keygen link meta param source track wbr}

Class Method Summary collapse

Class Method Details

.build(*args, &block) ⇒ Object



11
12
13
# File 'lib/bblib/html/builder.rb', line 11

def self.build(*args, &block)
  Builder.build(*args, &block)
end

.self_close?(tag) ⇒ Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/bblib/html/builder.rb', line 7

def self.self_close?(tag)
  SELF_CLOSING_TAGS.include?(tag.to_s.downcase)
end