Class: AWSCosts::S3
- Inherits:
-
Object
- Object
- AWSCosts::S3
- Defined in:
- lib/awscosts/s3.rb
Constant Summary collapse
- REGION_MAPPING =
{ 'us-east-1' => "us-std", 'us-west-1' => "us-west-1", 'us-west-2' => "us-west-2", 'eu-west-1' => "eu-west-1", 'eu-central-1' => "eu-central-1", 'ap-southeast-1' => "ap-southeast-1", 'ap-southeast-2' =>"ap-southeast-2", 'ap-northeast-1' =>"ap-northeast-1", 'sa-east-1' => "sa-east-1" }
Instance Attribute Summary collapse
-
#region ⇒ Object
readonly
Returns the value of attribute region.
Instance Method Summary collapse
- #data_transfer ⇒ Object
-
#initialize(region) ⇒ S3
constructor
A new instance of S3.
- #requests ⇒ Object
- #storage ⇒ Object
Constructor Details
#initialize(region) ⇒ S3
Returns a new instance of S3.
21 22 23 |
# File 'lib/awscosts/s3.rb', line 21 def initialize region @region = REGION_MAPPING[region.name] end |
Instance Attribute Details
#region ⇒ Object (readonly)
Returns the value of attribute region.
7 8 9 |
# File 'lib/awscosts/s3.rb', line 7 def region @region end |
Instance Method Details
#data_transfer ⇒ Object
29 30 31 |
# File 'lib/awscosts/s3.rb', line 29 def data_transfer AWSCosts::S3DataTransfer.fetch(@region) end |
#requests ⇒ Object
33 34 35 |
# File 'lib/awscosts/s3.rb', line 33 def requests AWSCosts::S3Requests.fetch(@region) end |