Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Foo
- BAR = {a: 0}
- def initialize
- @whatever = BAR
- #...
- @whatever[:a] += 1
- puts @whatever[:a]
- end
- end
- Foo.new #output: 1
- Foo.new #output: 2
- Foo.new #output: 3
- Foo.new #output: 4
- Foo.new #output: 5
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement