Method: JsDuck::Warning::Registry#set

Defined in:
lib/jsduck/warning/registry.rb

#set(type, enabled, path_pattern = nil, params = []) ⇒ Object

Enables or disables a particular warning type. Additionally a filename pattern and params for the warning can be specified.



80
81
82
83
84
85
86
# File 'lib/jsduck/warning/registry.rb', line 80

def set(type, enabled, path_pattern=nil, params=[])
  if @warnings_map[type]
    @warnings_map[type].set(enabled, path_pattern, params)
  else
    raise WarnException, "Warning of type '#{type}' doesn't exist"
  end
end