Module: RuboCop::Cop::NilMethods
Relationships & Source Files | |
Extension / Inclusion / Inheritance Descendants | |
Included In:
| |
Super Chains via Extension / Inclusion / Inheritance | |
Instance Chain:
self,
AllowedMethods
|
|
Defined in: | lib/rubocop/cop/mixin/nil_methods.rb |
Overview
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.
Instance Attribute Summary
AllowedMethods
- Included
Instance Method Summary
- #nil_methods private
- #other_stdlib_methods private
AllowedMethods
- Included
Instance Method Details
#nil_methods (private)
[ GitHub ]# File 'lib/rubocop/cop/mixin/nil_methods.rb', line 14
def nil_methods nil.methods + other_stdlib_methods + allowed_methods.map(&:to_sym) end
#other_stdlib_methods (private)
[ GitHub ]# File 'lib/rubocop/cop/mixin/nil_methods.rb', line 18
def other_stdlib_methods [:to_d] end