lib/sarah.rb in sarah-0.0.1 vs lib/sarah.rb in sarah-0.0.2

- old
+ new

@@ -27,16 +27,19 @@ # If passed a block, the block is called to provide default values # instead of using the :default option value. The block is passed the # hash and the requested key (or nil for a shift or pop on an empty # sequential array). # - # @param opts [Array] Setup options. + # @param opts [Hash] Setup options. # @option opts :default The default value to return for a non-existent key. - # @option opts :default_proc The default proc to call for a non-existent - # key. - # @option opts :array An array (or hash!) to use for initialization (first). - # @option opts :hash A hash (or array!) to use for initialization (second). - # @option opts :from An array or hash to use for initialization (third). + # @option opts [Proc] :default_proc The default proc to call for a + # non-existent key. + # @option opts [Array, Hash] :array An array (or hash!) to use for + # initialization (first). + # @option opts [Hash, Array] :hash A hash (or array!) to use for + # initialization (second). + # @option opts [Array, Hash] :from An array or hash to use for + # initialization (third). def initialize (opts = {}, &block) clear @default = opts[:default] @default_proc = block || opts[:default_proc] merge! opts[:array], opts[:hash], opts[:from]