Sha256: 5724f66387e0b438f33a9790132cf07ad60548e821201f7e6b868f03c5c86d1f

Contents?: true

Size: 1.38 KB

Versions: 1

Compression:

Stored size: 1.38 KB

Contents

module ExpressTemplates
  module Components
    class HtmlTag < ExpressTemplates::Component
      TAGS = [ :a, :abbr, :address, :area, :article, :aside, :audio,
               :b, :base, :bdi, :bdo, :blockquote, :body, :br, :button,
               :canvas, :caption, :cite, :code, :col, :colgroup,
               :data, :datalist, :dd, :del, :details, :dfn, :div, :dl, :dt,
               :em, :embed,
               :fieldset, :figcaption, :figure, :footer, :form,
               :h1, :h2, :h3, :h4, :h5, :h6, :head, :header, :hr, :html,
               :i, :iframe, :img, :input, :ins,
               :kbd, :keygen,
               :label, :legend, :li, :link,
               :main, :map, :mark, :math, :menu, :menuitem, :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, :sup, :summary, :svg,
               :table, :tbody, :td, :textarea, :tfoot, :th, :thead, :time, :title,
               :tr, :track,
               :u, :ul,
               :var, :video,
               :wbr]

    end

    HtmlTag::TAGS.each do |tag|
      klass = tag.to_s.titleize
      ExpressTemplates::Components.module_eval "class #{klass} < HtmlTag ; end"
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
express_templates-0.2.0 lib/express_templates/components/html_tag.rb