Double colon in class name and RubyMine complaints about short name

S.S.J

I have the following autogenerated controller in conrollers/v2/base_controller.rb.

class V2::BaseController < ApplicationController
end

It was generated by Versionist gem. I am trying to make a controller inherited from V2::BaseController. I wrote

class V2::MainController < V2::BaseController
  def index
    render :text => 'abcde'
  end
end

It works fine and I can see my text rendered in browser. However, RubyMine IDE complains that the class name V2 in V2::MainController is too short and I should rename the class.

I am confused because I thought that V2:: means that we define a new class inside V2 module. If I am wrong, then why does RubyMine ignore the same problem with BaseController?

UPD: RubyMine complaint

RubyMine complaint

dimakura

RubyMine uses reek for code smell detection.

Warning it's giving you is called Uncommunicative Module Name.

Uncommunicative Module Name checks for:

  1. 1-character names
  2. any name ending with a number

In your case warning was caused with 2 in V2. Even for Version2 it would be the same.

But it's actually only a recommendation. Ruby works fine with this code.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

colon after class name in java what is for

From Dev

Use of colon after class name in c++

From Dev

Use of colon after class name in c++

From Dev

Completing attribute name in RubyMine?

From Dev

Short name for imported constant class fields

From Dev

How to redirect to another activity with the short class name

From Dev

Symfony 2 bundle name, using short name for class

From Dev

Colon in batch variable name

From Java

How do I get an object's unqualified (short) class name?

From Dev

Parsing field name with a colon in JSON

From Dev

What happens to the file with colon in the name?

From Dev

Define short Class name Method name can reduce memory usage or software package size?

From Dev

Summarize full name to short name.

From Dev

Windows Short name does not match long name

From Dev

Summarize full name to short name.

From Dev

How to use a short name for a long domain name

From Dev

double colon in module, calling a class constructor?

From Dev

Git short branch name in teamcity

From Dev

Git short branch name in teamcity

From Dev

Strange short path name on Windows

From Dev

Meteor changing package name with colon to suit Windows

From Dev

Colon after struct name with data type

From Dev

XSLT: Colon in attribute name in source XML

From Dev

tar command to extract archive with colon in the name

From Dev

Video Sitemap colon in name using LINQ to XML

From Dev

Creating a symlink with a colon in the name on cygwin bash

From Dev

Tar cf cannot archive files with a colon in their name

From Dev

How to read properties with ":" colon in key name

From Dev

Jquery filter out the double class name with each function

Related Related

HotTag

Archive