Class: GLRubocop::GLCops::InteractorInheritsFromInteractorBase

Inherits:
RuboCop::Cop::Cop
  • Object
show all
Defined in:
lib/gl_rubocop/gl_cops/interactor_inherits_from_interactor_base.rb

Constant Summary collapse

MSG =
'Interactor should inherit from InteractorBase'.freeze

Instance Method Summary collapse

Instance Method Details

#on_class(klass) ⇒ Object



4
5
6
7
8
9
# File 'lib/gl_rubocop/gl_cops/interactor_inherits_from_interactor_base.rb', line 4

def on_class(klass)
  return unless klass.instance_of?(RuboCop::AST::ClassNode)
  return unless klass.parent_class.nil?

  add_offense(klass)
end