Class: Hako::Scripts::NginxFront::S3Config
- Inherits:
-
Struct
- Object
- Struct
- Hako::Scripts::NginxFront::S3Config
- Defined in:
- lib/hako/scripts/nginx_front.rb
Instance Attribute Summary collapse
-
#bucket ⇒ Object
Returns the value of attribute bucket.
-
#prefix ⇒ Object
Returns the value of attribute prefix.
-
#region ⇒ Object
Returns the value of attribute region.
Instance Method Summary collapse
-
#initialize(options) ⇒ S3Config
constructor
A new instance of S3Config.
- #key(app_id) ⇒ Object
Constructor Details
#initialize(options) ⇒ S3Config
Returns a new instance of S3Config.
13 14 15 16 17 |
# File 'lib/hako/scripts/nginx_front.rb', line 13 def initialize() # rubocop:disable Lint/MissingSuper self.region = .fetch('region') self.bucket = .fetch('bucket') self.prefix = .fetch('prefix', nil) end |
Instance Attribute Details
#bucket ⇒ Object
Returns the value of attribute bucket
11 12 13 |
# File 'lib/hako/scripts/nginx_front.rb', line 11 def bucket @bucket end |
#prefix ⇒ Object
Returns the value of attribute prefix
11 12 13 |
# File 'lib/hako/scripts/nginx_front.rb', line 11 def prefix @prefix end |
#region ⇒ Object
Returns the value of attribute region
11 12 13 |
# File 'lib/hako/scripts/nginx_front.rb', line 11 def region @region end |
Instance Method Details
#key(app_id) ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/hako/scripts/nginx_front.rb', line 19 def key(app_id) if prefix "#{prefix}/#{app_id}.conf" else "#{app_id}.conf" end end |