FWIW I read too quickly before I sent the mail previous to this one. Orion
put me straight, I have no objections to this and will put it in the interop
features box.
---
Met vriendelijke groeten - Best regards - Salutations
Ivan Porto Carrero
Blog: http://flanders.co.nz
Google Wave: portocarrero.i
I thought '.' was for instance and '::' for static members. I need to brush
up on my Ruby! :)
Ryan Riley
Email: ryan.ri...@panesofglass.org
LinkedIn: http://www.linkedin.com/in/ryanriley
Blog: http://wizardsofsmart.net/
Website: http://panesofglass.org/
On Tue, Nov 17, 2009 at 11:29 AM, Ivan P
both work :: but in practice you see . more often though (it should also be
SomeClass::new if we're going down that route :))
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/82031?help-en
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/250948
http://blade.nagaokaut.ac.jp/cg
On Fri, Nov 13, 2009 at 1:06 PM, Shay Friedman wrote:
> I guess you can do that in two ways.
>
> The first one is to add a statement in Ruby code:
>
> class Object
> def mymethod(str)
> MyCSharpClass.mymethod(str)
> end
> end
>
>
Maybe I'm missing something, but shouldn't that be:
def m
> From: ironruby-core-boun...@rubyforge.org [mailto:ironruby-core-
> boun...@rubyforge.org] On Behalf Of Alexandre Mutel
> Sent: Friday, November 13, 2009 1:45 PM
> To: ironruby-core@rubyforge.org
> Subject: Re: [Ironruby-core] Calling a C# static from IronRuby
>
> >
On Fri, Nov 13, 2009 at 9:07 PM, Jimmy Schementi > wrote:
FYI, we’re thinking about allowing you to use “include” with .NET
types, which will include it’s static methods. That would enable:
I'd be very much in favour of this. A .NET static class full of static
methods always seemed like it
> On a similar subject, is there a way to resolve dynamic variable at
> runtime? Like, a user type a variable that was not declared, but the DLR
> host is able to create on the fly an object for this variable and return
> it. Is it possible? Is "IDynamicMetaObjectProvider" and
> "IAttributesCol
Ivan Porto carrero wrote:
> You can only reach it by adding the class as receiver.
>
> but you can use method missing as a dispatcher:
>
> alias :old_mm :method_missing
> def method_missing(method_name, *args, &block)
>return MyCSharpClass.send(method_name, *args) if
> MyCSharpClass.respond_
rom MyCSharpClass import mymethod
>
> print mymethod("foo")
>
>
>
> ~Jimmy
>
>
>
> *From:* ironruby-core-boun...@rubyforge.org [mailto:
> ironruby-core-boun...@rubyforge.org] *On Behalf Of *Ivan Porto Carrero
> *Sent:* Friday, November 13, 2009 11:04 AM
> *To:* i
t mymethod("foo")
~Jimmy
From: ironruby-core-boun...@rubyforge.org
[mailto:ironruby-core-boun...@rubyforge.org] On Behalf Of Ivan Porto Carrero
Sent: Friday, November 13, 2009 11:04 AM
To: ironruby-core@rubyforge.org
Subject: Re: [Ironruby-core] Calling a C# static from IronRuby
You
You can only reach it by adding the class as receiver.
but you can use method missing as a dispatcher:
alias :old_mm :method_missing
def method_missing(method_name, *args, &block)
return MyCSharpClass.send(method_name, *args) if MyCSharpClass.respond_to?
method_name
old_mn method_name, *arg
I guess you can do that in two ways.
The first one is to add a statement in Ruby code:
class Object
def mymethod(str)
MyCSharpClass.mymethod(str)
end
end
Or you can write an IronRuby extension in C# and make that class extend the
Object class.
Shay.
--
12 matches
Mail list logo