From: "Jesús Gabriel y Galán" Date: 2010-10-13T23:22:11+09:00 Subject: Re: Options in a class On Wed, Oct 13, 2010 at 4:16 PM, Paul Bergstrom wrote: > What about being able to pass different values to :color, like :color => > 'red or :color => 'blue'? How do I deal with that inside the module? You want to pass several colors in one go? Use an array as the value: irb(main):028:0> module Abc irb(main):029:1> def self.test(options = {}) irb(main):030:2> colors = options[:colors] || [:red] irb(main):031:2> puts "The chosen colors are: #{colors.inspect}" irb(main):032:2> end irb(main):033:1> end => nil irb(main):034:0> Abc.test(:colors => [:red, :green, :blue]) The chosen colors are: [:red, :green, :blue] Jesus.