A
Ara.T.Howard
i like a method like this
def inside_metaclass?
# to be implemented
end
class C
class << self
p inside_metaclass? #=> true
end
p inside_metaclass? #=> false
end
p inside_metaclass? #=> false
class << []
p inside_metaclass? #=> true
end
can this be done?
cheers.
-a
--
===============================================================================
| email :: ara [dot] t [dot] howard [at] noaa [dot] gov
| phone :: 303.497.6469
| renunciation is not getting rid of the things of this world, but accepting
| that they pass away. --aitken roshi
===============================================================================
def inside_metaclass?
# to be implemented
end
class C
class << self
p inside_metaclass? #=> true
end
p inside_metaclass? #=> false
end
p inside_metaclass? #=> false
class << []
p inside_metaclass? #=> true
end
can this be done?
cheers.
-a
--
===============================================================================
| email :: ara [dot] t [dot] howard [at] noaa [dot] gov
| phone :: 303.497.6469
| renunciation is not getting rid of the things of this world, but accepting
| that they pass away. --aitken roshi
===============================================================================