Example
开发者_运维问答def Object.const_missing(name)
puts self.class
end
class A; end
A::B # => Class
How can I get A
in Object#const_missing
?
def Object.const_missing(name)
puts self
end
Example
开发者_运维问答def Object.const_missing(name)
puts self.class
end
class A; end
A::B # => Class
How can I get A
in Object#const_missing
?
def Object.const_missing(name)
puts self
end
精彩评论