@private
@return [Configuration] Returns the configuration for this object.
@private
# File lib/aws/core/model.rb, line 21 def initialize(*args) options = args.last.kind_of?(Hash) ? args.last : {} @config = case when options[:config] then options[:config] when args.first.respond_to?(:config) then args.first.config else AWS.config end end
Each class including this module has its own client class. Generally it is the service namespace suffixed by client:
s3_client
simple_db_client
@return Retruns the proper client class for the given model.
# File lib/aws/core/model.rb, line 40 def client @config.send("#{config_prefix}_client") end
@return [String] The short name of the service as used in coniguration.
(e.g. SimpleDB::Client.config_prefix #=> 'simple_db')
# File lib/aws/core/model.rb, line 46 def config_prefix Inflection.ruby_name(self.class.to_s.split(%r::/)[1]) end
@return [String] A sensible default inspect string.
# File lib/aws/core/model.rb, line 51 def inspect "<#{self.class}>" end