mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
30 lines
359 B
Ruby
30 lines
359 B
Ruby
|
class CApiObjectSpecs
|
||
|
class IVars
|
||
|
def initialize
|
||
|
@a = 3
|
||
|
@b = 7
|
||
|
@c = 4
|
||
|
end
|
||
|
|
||
|
def self.set_class_variables
|
||
|
@@foo = :a
|
||
|
@@bar = :b
|
||
|
@@baz = :c
|
||
|
end
|
||
|
end
|
||
|
|
||
|
module MVars
|
||
|
@@mvar = :foo
|
||
|
@@mvar2 = :bar
|
||
|
|
||
|
@ivar = :baz
|
||
|
end
|
||
|
|
||
|
module CVars
|
||
|
@@cvar = :foo
|
||
|
@@cvar2 = :bar
|
||
|
|
||
|
@ivar = :baz
|
||
|
end
|
||
|
end
|