Class: Hako::Front::S3Config
- Inherits:
-
Struct
- Object
- Struct
- Hako::Front::S3Config
- Defined in:
- lib/hako/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.
7 8 9 10 11 |
# File 'lib/hako/front.rb', line 7 def initialize() 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
6 7 8 |
# File 'lib/hako/front.rb', line 6 def bucket @bucket end |
#prefix ⇒ Object
Returns the value of attribute prefix
6 7 8 |
# File 'lib/hako/front.rb', line 6 def prefix @prefix end |
#region ⇒ Object
Returns the value of attribute region
6 7 8 |
# File 'lib/hako/front.rb', line 6 def region @region end |
Instance Method Details
#key(app_id) ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/hako/front.rb', line 13 def key(app_id) if prefix "#{prefix}/#{app_id}.conf" else "#{app_id}.conf" end end |