lib/amazon_sdb/multimap.rb
##
# Save a key/value attribute into the multimap. Takes additional options
# - <tt>:replace => true</tt> remove any attributes with the same key before insert (otherwise, appends)
Save a key/value attribute into the multimap. Takes additional options
:replace => true remove any attributes with the same key before insert (otherwise, appends)
Save a key / value attribute into the multimap . Takes additional options : replace = > true remove any attributes with the same key before insert ( otherwise appends )
def put(key_arg, value, options = {})
        key = key_arg.to_s
        if options[:before_cast]
          key = "#{key}_before_cast"
        end
        k = @mset[key]
        clear_size!
        if k.nil? || options[:replace]
          @mset[key] = value
        else
          if @mset[key].is_a? Array
            @mset[key] << value
          else
            @mset[key] = [@mset[key], value]
          end
        end
      end
def put ( key_arg , value , options = { } ) key = key_arg . to_s if options [ :before_cast ] key = "#{key}_before_cast" end k = @mset [ key ] clear_size! if k . nil? || options [ :replace ] @mset [ key ] = value else if @mset [ key ] . is_a? Array @mset [ key ] << value else @mset [ key ] = [ @mset [ key ] , value ] end end end
Save a key/value attribute into the multimap.
Save a key / value attribute into the multimap .
key_arg
value
options