lib/simple_aws/api.rb in simple_aws-1.2.0 vs lib/simple_aws/api.rb in simple_aws-1.2.1
- old
+ new
@@ -54,11 +54,11 @@
@version = version
end
end
- attr_reader :access_key, :secret_key, :region, :version
+ attr_reader :access_key, :secret_key, :region, :version, :debug_to
##
# Construct a new access object for the API in question.
#
# @param access_key [String] Amazon access key
@@ -71,9 +71,17 @@
@region = region || self.class.instance_variable_get("@default_region")
@endpoint = self.class.instance_variable_get("@endpoint")
@use_https = self.class.instance_variable_get("@use_https")
@version = self.class.instance_variable_get("@version")
+ end
+
+ ##
+ # Flag this API to render debugging information to an IO location.
+ # Default is $stdout
+ ##
+ def debug!(location = $stdout)
+ @debug_to = location
end
##
# Get the full host name for the current API
#