module Reek::Configuration::RakeTaskConverter
Responsible for converting configuration values coming from the outside world to whatever we want to use internally.
Constants
- REGEXABLE_ATTRIBUTES
Public Class Methods
Source
# File lib/reek/configuration/rake_task_converter.rb, line 18 def convert(configuration) (configuration.keys & REGEXABLE_ATTRIBUTES).each do |attribute| configuration[attribute] = configuration[attribute].map do |item| item.is_a?(Regexp) ? item.inspect : item end end configuration end
Converts marked strings like “/foobar/” into regexes.
@param configuration [Hash] e.g.
{"enabled"=>true, "exclude"=>[], "reject"=>[/^[a-z]$/, /[0-9]$/, /[A-Z]/], "accept"=>[]}
@return [Hash]
@quality :reek:NestedIterators { max_allowed_nesting: 2 }