module RuboCop::Cop::NilMethods
This module provides a list of methods that are:
-
In the NilClass by default
-
Added to NilClass by explicitly requiring any standard libraries
-
Cop’s configuration parameter
AllowedMethods
.
Private Instance Methods
Source
# File lib/rubocop/cop/mixin/nil_methods.rb, line 14 def nil_methods nil.methods + other_stdlib_methods + allowed_methods.map(&:to_sym) end
Source
# File lib/rubocop/cop/mixin/nil_methods.rb, line 18 def other_stdlib_methods [:to_d] end