module Yrpc module AutoLoading def Object.const_missing name $LOAD_PATH << File.join("./","app","controllers") unless $LOAD_PATH.include?("./app/controllers") $LOAD_PATH << File.join("./","app","models") unless $LOAD_PATH.include?("./app/models") require Yrpc::Ruler.to_underscore(name.to_s) klass = Object.const_get(name) klass end end end