determine arguments passed to a method at runtime

Discussion in 'Ruby' started by Alfonso, Jan 17, 2007.

  1. Alfonso

    Alfonso Guest

    Is that possible?

    What I want to do is, using RMagick, create a ImageList with the gifs
    containded in a folder, so the script would first record the names,
    and then pass them to the constructor of the ImageList. It would be
    something like this (if this worked):

    #arguments passed to the constructor ImageList.new
    args = []

    dir = Dir.new("gifs")
    dir.each do |nombre|
    #populate the arguments array
    args.push(nombre)
    end

    list = ImageList.new(args)


    Thank's in advance.



    ______________________________________________
    LLama Gratis a cualquier PC del Mundo.
    Llamadas a fijos y móviles desde 1 céntimo por minuto.
    http://es.voice.yahoo.com
     
    Alfonso, Jan 17, 2007
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. mykidisgollum
    Replies:
    2
    Views:
    482
    Eric Lawrence [MSFT]
    Mar 4, 2004
  2. dee
    Replies:
    9
    Views:
    749
    Joseph Byrns
    Apr 15, 2005
  3. Storm
    Replies:
    1
    Views:
    608
    Chris Uppal
    May 1, 2004
  4. Martin Magnusson

    macro passed wrong number of arguments

    Martin Magnusson, Jun 15, 2004, in forum: C++
    Replies:
    4
    Views:
    754
    red floyd
    Jun 15, 2004
  5. Martin Magnusson

    macro passed wrong number of arguments

    Martin Magnusson, Jun 15, 2004, in forum: C++
    Replies:
    1
    Views:
    745
    Rolf Magnus
    Jun 15, 2004
  6. Anand
    Replies:
    2
    Views:
    1,089
    Anand
    Sep 11, 2003
  7. Adam Wozniak
    Replies:
    40
    Views:
    1,117
    Martin Demberger
    Aug 17, 2009
  8. Peña, Botp
    Replies:
    1
    Views:
    479
    Robert Klemme
    Jan 24, 2004
Loading...