Class: Rubydex::Rules::DynamicSingletonDefinition

Inherits:
Rubydex::Rule
  • Object
show all
Defined in:
lib/rubydex/rules/dynamic_singleton_definition.rb

Overview

Dynamic singleton targets cannot be reasoned about statically because they depend on runtime values. The program may still be valid, but the quality of the analysis degrades.

class << var
         ^^^ Dynamic singleton target. This might be correct, but it cannot be understood by the analysis.
end

def var.bar
    ^^^ Dynamic singleton target.
end

Class Method Summary collapse

Methods inherited from Rubydex::Rule

rule_name, severity

Class Method Details

.default_severityObject

: -> singleton(Severity::Base)



24
25
26
# File 'lib/rubydex/rules/dynamic_singleton_definition.rb', line 24

def default_severity
  Severity::Information
end