. I have noticed that if I define a property in Ruby using
, it is presented to C# as a property. If, on the other hand, I create the exact same code manually, it comes back as a method.
For example, take this code:
var engine = IronRuby.Ruby.CreateEngine();
string script = @"
@manual = val
@automatic = ""testing""
@manual = ""testing""
var testObject = engine.Execute(script);
var automatic = testObject.automatic;
var manual = testObject.manual;
When you look at the C#
variable, the value is a string of "testing". If you look at the C#
variable, it is type IronRuby.Builtins.RubyMethod.
Ultimately, I want to create my own properties in Ruby that can be used in C#, but I can't seem to make them be visible as properties like