Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use class inst. var. instead of class var. #641

Merged
merged 1 commit into from Nov 8, 2015
Merged

Commits on Nov 2, 2015

  1. Use class inst. var. instead of class var.

    I use the term "class instance variable" and "class variable"
    even though `PaperTrail` is a module. This nomenclature is
    conventional in ruby.
    
    > module A; @@x = :x; puts defined?(@@x); end
    > #=> "class variable"
    
    Actually, because `PaperTrail` is a module, the use of a class
    variable here is not as problematic as in an actual class, so
    this change is solely to conform the the Ruby Style Guide.
    
    > Avoid the usage of class (@@) variables due to their "nasty"
    > behavior in inheritance.
    > https://github.com/bbatsov/ruby-style-guide#no-class-vars
    
    As stated above, because `PaperTrail` is a module, there is no
    concern over inheritance, and this change is solely to conform
    to the style guide.
    jaredbeck committed Nov 2, 2015
    Copy the full SHA
    14c5216 View commit details
    Browse the repository at this point in the history