airbnb / ruby

Ruby Style Guide

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allowing symbols when specifying class for Airbnb/ClassName and Airbnb/FactoryClassUseString

tomprats opened this issue · comments

Airbnb/ClassName and Airbnb/FactoryClassUseString both work on the idea of not loading the classes. Using a symbol is also a valid way to specify the classes.

# Bad
class: MyClass

# Good
class: "MyClass"

# Also Good
class: :MyClass

Looking into it, it'd be a pretty simple to add the symbol check. I'd be interested in making the PR if this is a use-case you'll allow

Closing based on the feedback on the corresponding PR #160

Perhaps after upgrading to a higher ruby version it'd be more natural, but for now strings are pretty standard