Module: AWS::Core::Model
- Included in:
- Collection::Limitable, Collection::Simple, Resource, DynamoDB::AttributeCollection, DynamoDB::BatchGet, DynamoDB::BatchWrite, EC2::AttachmentCollection, EC2::Collection, EC2::PermissionCollection, EC2::ResourceTagCollection, EC2::SecurityGroup::EgressIpPermissionCollection, EC2::SecurityGroup::IngressIpPermissionCollection, EC2::SecurityGroup::IpPermission, ELB::Listener, IAM::MFADevice, S3::Bucket, S3::BucketCollection, S3::MultipartUpload, S3::MultipartUploadCollection, S3::ObjectCollection, S3::ObjectMetadata, S3::ObjectUploadCollection, S3::ObjectVersion, S3::ObjectVersionCollection, S3::PresignedPost, S3::S3Object, S3::Tree::ChildCollection, S3::Tree::Parent, S3::UploadedPart, S3::UploadedPartCollection, SNS::Subscription, SNS::SubscriptionCollection, SNS::Topic, SNS::TopicCollection, SNS::TopicSubscriptionCollection, SQS::Queue, SQS::QueueCollection, SQS::ReceivedMessage, SQS::ReceivedSNSMessage, SimpleDB::Attribute, SimpleDB::AttributeCollection, SimpleDB::Domain, SimpleDB::DomainCollection, SimpleDB::DomainMetadata, SimpleDB::Item, SimpleEmailService::EmailAddressCollection, SimpleEmailService::Quotas, SimpleWorkflow::ActivityTask, SimpleWorkflow::ActivityTaskCollection, SimpleWorkflow::DecisionTask, SimpleWorkflow::DecisionTaskCollection, SimpleWorkflow::HistoryEvent
- Defined in:
- lib/aws/core/model.rb
Instance Attribute Summary collapse
-
#config ⇒ Configuration
readonly
Returns the configuration for this object.
Instance Method Summary collapse
-
#client ⇒ Object
Each class including this module has its own client class.
-
#config_prefix ⇒ String
The short name of the service as used in coniguration.
- #initialize(*args) ⇒ Object
-
#inspect ⇒ String
A sensible default inspect string.
Instance Attribute Details
#config ⇒ Configuration (readonly)
Returns the configuration for this object.
31 32 33 |
# File 'lib/aws/core/model.rb', line 31 def config @config end |
Instance Method Details
#client ⇒ Object
Each class including this module has its own client class. Generally it is the service namespace suffixed by client:
-
s3_client
-
simple_db_client
40 41 42 |
# File 'lib/aws/core/model.rb', line 40 def client @config.send("#{config_prefix}_client") end |
#config_prefix ⇒ String
Returns The short name of the service as used in coniguration. (e.g. SimpleDB::Client.config_prefix #=> ‘simple_db’).
46 47 48 |
# File 'lib/aws/core/model.rb', line 46 def config_prefix Inflection.ruby_name(self.class.to_s.split(/::/)[1]) end |
#initialize(*args) ⇒ Object
21 22 23 24 25 26 27 28 |
# File 'lib/aws/core/model.rb', line 21 def initialize(*args) = args.last.kind_of?(Hash) ? args.last : {} @config = case when [:config] then [:config] when args.first.respond_to?(:config) then args.first.config else AWS.config end end |
#inspect ⇒ String
Returns A sensible default inspect string.
51 52 53 |
# File 'lib/aws/core/model.rb', line 51 def inspect "<#{self.class}>" end |