Ruby 1.8.7 リファレンスマニュアル > ライブラリ一覧 > 組み込みライブラリ > Moduleクラス > const_missing
const_missing(name)定義されていない定数を参照したときに Ruby インタプリタが このメソッドを呼びます。
class Foo
  def Foo.const_missing(id)
    warn "undefined constant #{id.inspect}"
  end
  Bar
end
Foo::Bar
# => undefined constant :Bar
     undefined constant :Bar