ちょっとわかりにくいんだけど…
class A < CC
 @@foo = 'hoge'
 class B < DD
  def hoge
   ここで@@fooを読み書きしたい
  end
 end
end
の場合どうしたらいい?