the Document api from Ruby "wrong number of arguments"
Any IronRuby-ninjas out there? I'm trying to use the Document class to change properties for existing documents, but IronRuby does not seem to handle the constructor overload for integer (as document id) (?)
the whole code snippet is quite long for such an easy task, but it would be very easy to place some commonly used requires in a "global.rb" or something and then just keep the necessary files.
Why am I doing this? Well I'm having a simple RubyPad in my Umbraco backend and with the help of it I can now run some cleanup scripts for all kinds of node "housekeeping". RubyPad is simply two textareas, executing ruby code in one of them and displaying the result in the other.
the Document api from Ruby "wrong number of arguments"
Any IronRuby-ninjas out there? I'm trying to use the Document class to change properties for existing documents, but IronRuby does not seem to handle the constructor overload for integer (as document id) (?)
If I omit the id from the last row I can run my script, but I want to use an existing document and therefore I use the id.
I get the error:
wrong number of arguments (1 for 0)
I put the question at StackOverflow aswell, http://stackoverflow.com/questions/6310599/problem-to-instantiate-object-with-overloaded-constructor-in-ironruby/ ; the solution was to call clr_new instead of new, as there was already a New method on the Document class. Yay!
the whole code snippet is quite long for such an easy task, but it would be very easy to place some commonly used requires in a "global.rb" or something and then just keep the necessary files.
Why am I doing this? Well I'm having a simple RubyPad in my Umbraco backend and with the help of it I can now run some cleanup scripts for all kinds of node "housekeeping". RubyPad is simply two textareas, executing ruby code in one of them and displaying the result in the other.
is working on a reply...