lib/sucker/request.rb in sucker-0.1.0 vs lib/sucker/request.rb in sucker-0.1.1

- old
+ new

@@ -27,10 +27,15 @@ } args.each { |k, v| send("#{k}=", v) } end + # A helper method that merges a hash into the parameters + def <<(hash) + self.parameters.merge!(hash) + end + # A reusable, configurable cURL object def curl @curl ||= Curl::Easy.new yield @curl if block_given? @@ -97,10 +102,9 @@ :host => host, :path => path, :query => sign_query) end - # Timestamps the parameters def timestamp_parameters self.parameters["Timestamp"] = Time.now.utc.strftime('%Y-%m-%dT%H:%M:%SZ') end # Returns true if request has key, secret, and a valid locale set