Class: Class
- Defined in:
- lib/reek/class_context.rb,
lib/reek/smells/smell_detector.rb
Instance Method Summary collapse
Instance Method Details
#is_overriding_method?(name) ⇒ Boolean
5 6 7 8 9 10 |
# File 'lib/reek/class_context.rb', line 5 def is_overriding_method?(name) sym = name.to_sym mine = instance_methods(false) dads = superclass.instance_methods(true) (mine.include?(sym) and dads.include?(sym)) or (mine.include?(name) and dads.include?(name)) end |
#name_words ⇒ Object
4 5 6 7 |
# File 'lib/reek/smells/smell_detector.rb', line 4 def name_words class_name = name.split(/::/)[-1] class_name.gsub(/([a-z])([A-Z])/) { |sub| "#{$1} #{$2}"}.split end |