# Determine arguments passed to a method at runtime

**URL:** <https://www.ruby-forum.com/t/determine-arguments-passed-to-a-method-at-runtime/82103>\
**Category:** Ruby\
**Created:** [January 17, 2007, 1:41pm UTC](https://www.ruby-forum.com/t/determine-arguments-passed-to-a-method-at-runtime/82103 "2007-01-17T13:41:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alfonso](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/bbe5ce/32.png) [@Alfonso](https://www.ruby-forum.com/u/Alfonso)\
**Post date:** [January 17, 2007, 1:41pm UTC](https://www.ruby-forum.com/t/determine-arguments-passed-to-a-method-at-runtime/82103/1 "2007-01-17T13:41:18Z")

</div>

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](http://es.voice.yahoo.com)
