class RuboCop::Cop::Rails::I18nLocaleTexts

def on_send(node)

def on_send(node)
  case node.method_name
  when :validates
    validation_message(node) do |text_node|
      add_offense(text_node)
    end
    return
  when :redirect_to, :redirect_back
    text_node = redirect_to_flash(node).to_a.last
  when :[]=
    text_node = flash_assignment?(node)
  when :mail
    text_node = mail_subject(node).to_a.last
  end
  add_offense(text_node) if text_node
end