lib/amazon_sdb/multimap.rb
def to_sdb(options={})
        out = {}
        
        self.each_pair_with_index do |key, value, index|
          out["Attribute.#{index}.Name"] = sdb_key_escape(key)
          out["Attribute.#{index}.Value"] = sdb_value_escape(value)
          
          if options.key?(:replace) && (options[:replace] == :all || [*options[:replace]].find {|x| x.to_s == key })
            out["Attribute.#{index}.Replace"] = "true"
          end
        end

        out
      end
##
# Outputs a multimap to sdb using Amazon's query-string notation (and doing auto-conversions of int and date values)
Outputs a multimap to sdb using Amazon's query-string notation (and doing auto-conversions of int and date values)
Outputs a multimap to sdb using Amazon ' s query - string notation ( and doing auto - conversions of int and date values )
def to_sdb(options={})
        out = {}
        self.each_pair_with_index do |key, value, index|
          out["Attribute.#{index}.Name"] = sdb_key_escape(key)
          out["Attribute.#{index}.Value"] = sdb_value_escape(value)
          if options.key?(:replace) && (options[:replace] == :all || [*options[:replace]].find {|x| x.to_s == key })
            out["Attribute.#{index}.Replace"] = "true"
          end
        end
        out
      end
def to_sdb ( options = { } ) out = { } self . each_pair_with_index do | key , value , index | out [ "Attribute.#{index}.Name" ] = sdb_key_escape ( key ) out [ "Attribute.#{index}.Value" ] = sdb_value_escape ( value ) if options . key? ( :replace ) && ( options [ :replace ] == :all || [ * options [ :replace ] ] . find { | x | x . to_s == key } ) out [ "Attribute.#{index}.Replace" ] = "true" end end out end
Outputs a multimap to sdb using Amazon's query-string notation (and doing auto-conversions of int and date values)
Outputs a multimap to sdb using Amazon ' s query - string notation ( and doing auto - conversions of int and date values )
options