Class: Jets::Resource::S3::Bucket
- Defined in:
- lib/jets/resource/s3/bucket.rb
Instance Attribute Summary collapse
-
#bucket_logical_id ⇒ Object
readonly
Returns the value of attribute bucket_logical_id.
Instance Method Summary collapse
- #definition ⇒ Object
-
#initialize(props = {}) ⇒ Bucket
constructor
A new instance of Bucket.
- #outputs ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(props = {}) ⇒ Bucket
Returns a new instance of Bucket.
4 5 6 7 |
# File 'lib/jets/resource/s3/bucket.rb', line 4 def initialize(props={}) @props = props # associated_properties from dsl.rb @bucket_logical_id = props.delete(:logical_id) || "{namespace}_s3_bucket" end |
Instance Attribute Details
#bucket_logical_id ⇒ Object (readonly)
Returns the value of attribute bucket_logical_id.
3 4 5 |
# File 'lib/jets/resource/s3/bucket.rb', line 3 def bucket_logical_id @bucket_logical_id end |
Instance Method Details
#definition ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/jets/resource/s3/bucket.rb', line 9 def definition { bucket_logical_id => { type: "AWS::S3::Bucket", properties: @props, } } end |
#outputs ⇒ Object
18 19 20 21 22 |
# File 'lib/jets/resource/s3/bucket.rb', line 18 def outputs { bucket_logical_id => "!Ref #{bucket_logical_id.to_s.camelize}", } end |