Az IronRuby programozási nyelv

Nevek, elnevezések

Nevek, elnevezések

In an effort to make consuming .NET APIs in IronRuby more Rubyesque, IronRuby allows calling .NET code with Ruby idioms: CLR namespaces and interfaces must be capitalized as they are mapped onto Ruby modules CLR classes must be capitalized as they are mapped onto Ruby classes CLR methods that you call may either retain their original spelling (ie "WriteLine") or they may be used in a more Rubyesque form which is obtained by translating CamelCase to lowercase_and_delimited (ie "write_line") -- we call this "mangling" CLR virtual methods which you override from IronRuby could be overridden using either Ruby (foo_bar) or CLR (FooBar) name. Note: Mangled CLR method names are disabled for built-in types (Object, Fixnum, String, etc) since you can call .NET methods on a Ruby String, and there were problems with name conflicts. Mangling works for all other CLR types.