On Sep 30, 2007, at 9:32 AM, Jes Gabriel y Gal wrote:

> $compare_types = {"at_least" => :>=, "exactly" => :==,  
> "no_more_than" => :<=,
>                   "more_than" => :>, "less_than" => :<}

<snip>

> My question about main is the following: if you check my code, I have
> a variable ($compare_types) I need to use both in the validate block
> for an option and in the run method. Is there a better way to achieve
> this than a global variable?

I suggest making it a constant.

COMPARE_TYPES = { "at_least" => :>=, "exactly" => :==, "no_more_than"  
=> :<=,
                   "more_than" => :>, "less_than" => :< }

Regards, Morton