Skip to content

Fixes violations of and reenables Style/ClassMethods.#9263

Merged
ashercodeorg merged 1 commit into
stagingfrom
rubocopStyleClassMethods
Jun 30, 2016
Merged

Fixes violations of and reenables Style/ClassMethods.#9263
ashercodeorg merged 1 commit into
stagingfrom
rubocopStyleClassMethods

Conversation

@ashercodeorg

Copy link
Copy Markdown
Contributor

Fixes generated by bundle exec rubocop --only Style/ClassMethods --auto-correct.

@ashercodeorg

Copy link
Copy Markdown
Contributor Author

Is this really an improvement? Is this a rubocop we want to enforce?

@aoby

aoby commented Jun 30, 2016

Copy link
Copy Markdown
Contributor

I don't think so. I don't care too strongly, but it seems to me that def self.method is more concise and still unambiguous. Especially with longer class names the 'recommended' way could become unwieldy.

@ashercodeorg

Copy link
Copy Markdown
Contributor Author

Your answer confuses me, as I'm interepreting the "recommended" way to mean the way rubocop enforces. The "non-recommended" could become "unwieldy" with super-long class names.

@aoby

aoby commented Jun 30, 2016

Copy link
Copy Markdown
Contributor

Ha - that's because this morning I was reading it totally backwards for some reason and what I said makes no sense. You're right, the non-recommended way could become unwieldy.

I actually do prefer the rubocop recommended self.method over ClassName.method style.

As to whether we enforce it, I don't feel too strongly about it.

@ashercodeorg ashercodeorg merged commit 430c80f into staging Jun 30, 2016
@ashercodeorg ashercodeorg deleted the rubocopStyleClassMethods branch June 30, 2016 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants