Sha256: fc999ef967a8939a01ccbc85dd127b54bc76132bcf9cd0803a6b37ee17563055

Contents?: true

Size: 975 Bytes

Versions: 19

Compression:

Stored size: 975 Bytes

Contents

module JsDuck
  module Warning

    # A composite warning, encompassing all the other warning types.
    class All

      # Creates a deprecated warning with a mapping to :nodoc warning
      # type with given parameters.  The warning is disabled by
      # default.
      def initialize(warnings)
        @warnings = warnings
      end

      # Enables/disables all warnings.
      def set(enabled, path_pattern=nil, params=[])
        # When used with a path_pattern, only add the pattern to the rules
        # where it can have an effect - otherwise we get a warning.
        @warnings.each do |w|
          w.set(enabled, path_pattern, params)
        end
      end

      # Doesn't make sense to check if the :all warning is enabled.
      def enabled?(filename="", params=[])
        raise "Warning type 'all' must not be checked for enabled/disabled"
      end

      # The all-warning is documented separately
      def doc
        nil
      end

    end

  end
end

Version data entries

19 entries across 19 versions & 3 rubygems

Version Path
solvas-jsduck-6.0.0.30539 lib/jsduck/warning/all.rb
solvas-jsduck-6.0.0.9571 lib/jsduck/warning/all.rb
solvas-jsduck-6.0.0.6154 lib/jsduck/warning/all.rb
solvas-jsduck-6.0.0.4021 lib/jsduck/warning/all.rb
solvas-jsduck-6.0.0.2554 lib/jsduck/warning/all.rb
solvas-jsduck-6.0.0.1891 lib/jsduck/warning/all.rb
solvas-jsduck-6.0.0.beta.1888 lib/jsduck/warning/all.rb
jsduck-troopjs-0.0.10 lib/jsduck/warning/all.rb
jsduck-troopjs-0.0.9 lib/jsduck/warning/all.rb
jsduck-troopjs-0.0.8 lib/jsduck/warning/all.rb
jsduck-troopjs-0.0.7 lib/jsduck/warning/all.rb
jsduck-troopjs-0.0.5 lib/jsduck/warning/all.rb
jsduck-troopjs-0.0.4 lib/jsduck/warning/all.rb
jsduck-troopjs-0.0.3 lib/jsduck/warning/all.rb
jsduck-troopjs-0.0.1 lib/jsduck/warning/all.rb
jsduck-6.0.0beta lib/jsduck/warning/all.rb
jsduck-5.3.4 lib/jsduck/warning/all.rb
jsduck-5.3.3 lib/jsduck/warning/all.rb
jsduck-5.3.2 lib/jsduck/warning/all.rb