25 lines
315 B
Ruby
25 lines
315 B
Ruby
module Mo
|
|
MAPPING = { a: 'a', b: 'b' }
|
|
@mapping = 'ayza2'
|
|
class << self
|
|
@mapping_singleton = 'ayza'
|
|
def test
|
|
a = :a
|
|
p MAPPING.dig(a)
|
|
p @mapping
|
|
end
|
|
end
|
|
|
|
def test2
|
|
p MAPPING
|
|
end
|
|
end
|
|
|
|
|
|
Mo.test
|
|
|
|
# Mo::test2
|
|
|
|
p Mo.singleton_class.instance_variables
|
|
p Mo.instance_variables
|