123456789_123456789_123456789_123456789_123456789_

Class: RuboCop::ArgumentsEnv Private

Do not use. This class is for internal use only.
Relationships & Source Files
Inherits: Object
Defined in: lib/rubocop/arguments_env.rb

Overview

This is a class that reads optional command line arguments to rubocop from environment variable.

Class Method Summary

Class Method Details

.read_as_arguments

[ GitHub ]

  
# File 'lib/rubocop/arguments_env.rb', line 7

def self.read_as_arguments
  if (arguments = ENV.fetch('RUBOCOP_OPTS', '')).empty?
    []
  else
    require 'shellwords'

    Shellwords.split(arguments)
  end
end