Sha256: c0059ee071f17b7d48dac5ea37e5aaccecdd3a257d7d4455ccda5ef702f51cf0

Contents?: true

Size: 417 Bytes

Versions: 12

Compression:

Stored size: 417 Bytes

Contents

# frozen_string_literal: true

module RuboCop
  module Cop
    # Common functionality for Rails safe mode.
    #
    # This module can be removed from RuboCop 0.76.
    module SafeMode
      private

      def rails_safe_mode?
        safe_mode? || rails?
      end

      def safe_mode?
        cop_config['SafeMode']
      end

      def rails?
        config['Rails']&.fetch('Enabled')
      end
    end
  end
end

Version data entries

12 entries across 7 versions & 2 rubygems

Version Path
zuora_connect_ui-0.10.0 vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/mixin/safe_mode.rb
zuora_connect_ui-0.10.0 vendor/ruby/2.6.0/gems/rubocop-0.76.0/lib/rubocop/cop/mixin/safe_mode.rb
zuora_connect_ui-0.10.0 vendor/ruby/2.6.0/gems/rubocop-0.75.1/lib/rubocop/cop/mixin/safe_mode.rb
zuora_connect_ui-0.9.2 vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/mixin/safe_mode.rb
zuora_connect_ui-0.9.2 vendor/ruby/2.6.0/gems/rubocop-0.76.0/lib/rubocop/cop/mixin/safe_mode.rb
zuora_connect_ui-0.9.2 vendor/ruby/2.6.0/gems/rubocop-0.75.1/lib/rubocop/cop/mixin/safe_mode.rb
rubocop-0.76.0 lib/rubocop/cop/mixin/safe_mode.rb
zuora_connect_ui-0.9.1 vendor/ruby/2.6.0/gems/rubocop-0.75.1/lib/rubocop/cop/mixin/safe_mode.rb
zuora_connect_ui-0.9.1 vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/mixin/safe_mode.rb
rubocop-0.75.1 lib/rubocop/cop/mixin/safe_mode.rb
zuora_connect_ui-0.9.0 vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/mixin/safe_mode.rb
rubocop-0.75.0 lib/rubocop/cop/mixin/safe_mode.rb