Sha256: 8275821adfebcb887b8ee17a5372927708482c9b35b5a423a557b883205be10d

Contents?: true

Size: 818 Bytes

Versions: 1

Compression:

Stored size: 818 Bytes

Contents

module Accessibility
  class Rule
    attr_reader :element_names, :severity, :status, :title

    ####
    # An Accessibility::Rule represents a single Accessibility Developer Tools
    # audit rule that is checked on the document.
    #
    # A Rule has the following attributes:
    #
    #   * status, which can be "NA" (not applicable), "PASS", or "FAIL"
    #   * severity, which can be "Severe" or "Warning"
    #   * title, which is a description of the rule
    #   * element_names, an array of strings, each of them being a snippet of
    #                    the document where the issue was found
    # 
    def initialize(data)
      @element_names = data['element_names']
      @severity      = data['severity']
      @status        = data['status']
      @title         = data['title']
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
accessibility-0.1.0 lib/accessibility/rule.rb