# Question about main

**URL:** <https://www.ruby-forum.com/t/question-about-main/116220>\
**Category:** Ruby\
**Created:** [October 3, 2007, 4:56pm UTC](https://www.ruby-forum.com/t/question-about-main/116220 "2007-10-03T16:56:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![JesSSSSs\_Gabriel\_y\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/4da419/32.png) [@JesSSSSs\_Gabriel\_y\_S](https://www.ruby-forum.com/u/JesSSSSs_Gabriel_y_S)\
**Post date:** [October 3, 2007, 4:56pm UTC](https://www.ruby-forum.com/t/question-about-main/116220/1 "2007-10-03T16:56:23Z")

</div>

Hi,

I’m trying to use main for the following case:

program.rb -d 120 -z 7 /folder1 /folder2 /folder3 …

I’m using Ara’s main gem. I know you can specify arity for a parameter  
but I don’t know if it’s possible to capture all arguments:

require ‘main’

main {  
option(“zip”, “z”) {  
argument :required  
description “Zip files older than the specified number of days”  
cast :int  
}  
option(“delete”, “d”) {  
argument :required  
defaults 7  
description “Delete files older than the specified number of days.  
If --zip option is specified, only delete the files that are in  
between both dates”  
cast :int  
}  
argument(“folders”) {  
required  
argument :required  
arity 3 # but would like to capture all of them if there’s more  
}

def run  
p params[:folders].values #I would like this to be all params  
end  
}

Is there a way?

Jesus.
