Created
July 11, 2016 00:57
-
-
Save gr33n7007h/d6bacb1fa444ba4a78fd28151a20eca1 to your computer and use it in GitHub Desktop.
populate
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
#!/usr/bin/env ruby | |
class NamesList | |
@names = [] | |
def self.populate | |
@names | |
end | |
def populate | |
self.class.populate | |
end | |
end | |
NamesList.populate << "foo" | |
NamesList.populate << "bar" | |
n = NamesList.new | |
n.populate << "FOO" | |
n.populate << "BAR" | |
p NamesList.populate |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment