Sha256: ce447ec86e29776d06c497dbd0e0e549373cc085047d250d34d33c5063530110

Contents?: true

Size: 1.32 KB

Versions: 24

Compression:

Stored size: 1.32 KB

Contents

# frozen_string_literal: true

module RSpecHTML
  # HTML tag identification, used to determine viability for DOM traversal via chained methods.
  class Tags
    def self.include?(val)
      tags.include?(val.to_s.upcase)
    end

    def self.each(&block)
      tags.each { |tag| block.call(tag) }
    end

    # rubocop:disable Metrics/MethodLength
    def self.tags
      %w[
        A ABBR ACRONYM ADDRESS APPLET AREA ARTICLE ASIDE AUDIO B BASE BASEFONT BDI BDO BGSOUND
        BIG BLINK BLOCKQUOTE BODY BR BUTTON CANVAS CAPTION CENTER CITE CODE COL COLGROUP COMMAND
        CONTENT DATA DATALIST DD DEL DETAILS DFN DIALOG DIR DIV DL DT ELEMENT EM EMBED FIELDSET
        FIGCAPTION FIGURE FONT FOOTER FORM FRAME FRAMESET H1 H2 H3 H4 H5 H6 HEAD HEADER HGROUP HR
        HTML I IFRAME IMAGE IMG INPUT INS ISINDEX KBD KEYGEN LABEL LEGEND LI LINK LISTING MAIN
        MAIN MAP MARK MARQUEE MENU MENUITEM META METER MULTICOL NAV NEXTID NOBR NOEMBED NOFRAMES
        NOSCRIPT OBJECT OL OPTGROUP OPTION OUTPUT P PARAM PICTURE PLAINTEXT PRE PROGRESS Q RB RP
        RT RTC RUBY S SAMP SCRIPT SECTION SELECT SHADOW SLOT SMALL SOURCE SPACER SPAN STRIKE
        STRONG STYLE SUB SUMMARY SUP TABLE TBODY TD TEMPLATE TEXTAREA TFOOT TH THEAD TIME TITLE
        TR TRACK TT U UL VAR VIDEO WBR XMP
      ]
    end
    # rubocop:enable Metrics/MethodLength
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
rspec-html-0.3.5 lib/rspec_html/tags.rb
rspec-html-0.3.4 lib/rspec_html/tags.rb
rspec-html-0.3.3 lib/rspec_html/tags.rb
rspec-html-0.3.2 lib/rspec_html/tags.rb
rspec-html-0.3.1 lib/rspec_html/tags.rb
rspec-html-0.3.0 lib/rspec_html/tags.rb
rspec-html-0.2.20 lib/rspec_html/tags.rb
rspec-html-0.2.19 lib/rspec_html/tags.rb
rspec-html-0.2.18 lib/rspec_html/tags.rb
rspec-html-0.2.17 lib/rspec_html/tags.rb
rspec-html-0.2.16 lib/rspec_html/tags.rb
rspec-html-0.2.15 lib/rspec_html/tags.rb
rspec-html-0.2.14 lib/rspec_html/tags.rb
rspec-html-0.2.13 lib/rspec_html/tags.rb
rspec-html-0.2.12 lib/rspec_html/tags.rb
rspec-html-0.2.11 lib/rspec_html/tags.rb
rspec-html-0.2.10 lib/rspec_html/tags.rb
rspec-html-0.2.9 lib/rspec_html/tags.rb
rspec-html-0.2.8 lib/rspec_html/tags.rb
rspec-html-0.2.7 lib/rspec_html/tags.rb