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