[Ironruby-core] How to Refer to the Classes in my Custom DLL
Jimmy.Schementi at microsoft.com
Mon Jul 6 12:32:09 EDT 2009
"include" only works for .NET namespaces, as they map to Ruby modules, not Ruby classes. You can't "include" a Ruby class.
Does this class library have a namespace? If so, you can either use the fullname or include the namespace.
NameOfNamespace::BusinessObjects # => NameOfNamespace::BusinessObjects
BusinessObjects # => BusinessObjects
> -----Original Message-----
> From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-
> bounces at rubyforge.org] On Behalf Of Mohammad Azam
> Sent: Monday, July 06, 2009 9:28 AM
> To: ironruby-core at rubyforge.org
> Subject: [Ironruby-core] How to Refer to the Classes in my Custom DLL
> I have a class library in C# called "BusinessObjects" and I want to refer to that
> DLL using IronRuby.
> I typed:
> require 'BusinessObjects'
> include BusinessObjects
> >>> include BusinessObjects
> s\ModuleOps.cs:793:in `const_missing': uninitialized constant
> Object::BusinessOb jects (NameError)
> from :0
> I want to refer to a Customer class inside the BusinessObjects library.
> Posted via http://www.ruby-forum.com/.
> Ironruby-core mailing list
> Ironruby-core at rubyforge.org
More information about the Ironruby-core