Revision 383835326235 () - Diff

Link to this snippet: https://friendpaste.com/4qjwN0tVxkX68f2leDnvlo
Embed:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
class ExampleClass
p self #=> ExampleClass
@variable = "foo"
@@variable = "bar"
def initialize
p self #=> #<ExampleClass:…>
@variable = "baz"
end
def self.test
p self #=> ExampleClass
puts @variable
end
def test
p self #=> #<ExampleClass:…>
self.class.test
puts @@variable
puts @variable
end
end