Sha256: 218175131f132d03d56c4e7faa712bd8bea84654f0395226781b25fb3f9a3109
Contents?: true
Size: 573 Bytes
Versions: 20
Compression:
Stored size: 573 Bytes
Contents
# frozen_string_literal: true module RuboCop module Cop # This module provides a list of methods that are: # 1. In the NilClass by default # 2. Added to NilClass by explicitly requiring any standard libraries # 3. Cop's configuration parameter AllowedMethods. module NilMethods private def nil_methods nil.methods + other_stdlib_methods + allowed_methods end def other_stdlib_methods [:to_d] end def allowed_methods cop_config['AllowedMethods'].map(&:to_sym) end end end end
Version data entries
20 entries across 19 versions & 5 rubygems