Skip to content

Instantly share code, notes, and snippets.

@banister
Last active December 11, 2015 15:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save banister/9f8f17186c11a76f819e to your computer and use it in GitHub Desktop.
Save banister/9f8f17186c11a76f819e to your computer and use it in GitHub Desktop.
class MyClass
class << self
attr_reader :arr
end
@arr = []
end
# => ["test", "freakazoid"]
MyClass.arr << "test"
# => ["test", "freakazoid"]
MyClass.arr
# => ["test", "freakazoid"]
MyClass.arr << "freakazoid"
# => ["test", "freakazoid"]
MyClass.arr
# => ["test", "freakazoid"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment