It turns out that the problem is not accessing a module's class, but
accessing the contents of a module in a require'd file.

global.rb
  require 'app'

app.rb
  module RbScriptApp
      class Foo
          def Bar()
              return (rand(100) + 1).to_s()
          end
      end
  end

No matter what I do I can only access RbScriptApp and not Foo if I call
Runtime.UseFile("global.rb"). So far I have two other work arounds: 1.)
create wrapper methods for everything I want to access in app.rb (ugh),
or 2.) use Engine.Execute("RbScriptApp::Foo.new"). The latter is more
preferrable, I suppose, but it seems strange that I can't access Foo by
dynamic.

Any more information about this issue would be very helpful and
appreciated.

-- 
Posted via http://www.ruby-forum.com/.
_______________________________________________
Ironruby-core mailing list
Ironruby-core@rubyforge.org
http://rubyforge.org/mailman/listinfo/ironruby-core

Reply via email to