Class: RuboCop::Cop::HmvcRails::FormalStyle

Inherits:
Base
  • Object
show all
Defined in:
lib/rubocop/cop/hmvc_rails/formal_style.rb

Instance Method Summary collapse

Instance Method Details

#on_class(node) ⇒ Object



7
8
9
10
11
12
# File 'lib/rubocop/cop/hmvc_rails/formal_style.rb', line 7

def on_class(node)
  class_name = node.children.first.children.last.to_s
  return if class_name.end_with?("Form")

  add_offense(node, message: "The form name does not match the desired format")
end