Created
December 22, 2011 18:01
-
-
Save lukesmith/1511222 to your computer and use it in GitHub Desktop.
Why can't i do this?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyClass | |
@@defaults = { | |
:path => MyClass.default_path | |
} | |
def self.default_path | |
"something" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Be careful of issues with class variables versus class instance variables. See: http://martinfowler.com/bliki/ClassInstanceVariable.html and http://railstips.org/blog/archives/2006/11/18/class-and-instance-variables-in-ruby/