class RuboCop::Cop::Lint::DeprecatedClassMethods::DeprecatedClassMethod
Inner class to DeprecatedClassMethods
. This class exists to add abstraction and clean naming to the deprecated objects
Attributes
class_constant[R]
method[R]
Public Class Methods
new(method, class_constant: nil, correctable: true)
click to toggle source
# File lib/rubocop/cop/lint/deprecated_class_methods.rb, line 40 def initialize(method, class_constant: nil, correctable: true) @method = method @class_constant = class_constant @correctable = correctable end
Public Instance Methods
class_nodes()
click to toggle source
# File lib/rubocop/cop/lint/deprecated_class_methods.rb, line 46 def class_nodes @class_nodes ||= if class_constant [ s(:const, nil, class_constant), s(:const, s(:cbase), class_constant) ] else [nil] end end
correctable?()
click to toggle source
# File lib/rubocop/cop/lint/deprecated_class_methods.rb, line 58 def correctable? @correctable end
to_s()
click to toggle source
# File lib/rubocop/cop/lint/deprecated_class_methods.rb, line 62 def to_s [class_constant, method].compact.join(delimiter) end
Private Instance Methods
delimiter()
click to toggle source
# File lib/rubocop/cop/lint/deprecated_class_methods.rb, line 68 def delimiter CLASS_METHOD_DELIMITER end