T
Trans
Is there a better way to do conditional class extension?
module Foo
if const_getBar)
class Bar
def x; end
end
end recue nil
end
The 'if const_get ... rescue nil' doesn't seem very elegant.
Thanks,
T.
module Foo
if const_getBar)
class Bar
def x; end
end
end recue nil
end
The 'if const_get ... rescue nil' doesn't seem very elegant.
Thanks,
T.