Class: S3FileHandler::Configuration
- Inherits:
-
Object
- Object
- S3FileHandler::Configuration
- Defined in:
- lib/s3_file_handler/configuration.rb
Instance Attribute Summary collapse
-
#access_key_id ⇒ Object
Returns the value of attribute access_key_id.
-
#endpoint ⇒ Object
Returns the value of attribute endpoint.
-
#force_path_style ⇒ Object
Returns the value of attribute force_path_style.
-
#region ⇒ Object
Returns the value of attribute region.
-
#secret_access_key ⇒ Object
Returns the value of attribute secret_access_key.
Instance Method Summary collapse
- #client_options ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
7 8 9 |
# File 'lib/s3_file_handler/configuration.rb', line 7 def initialize @force_path_style = false end |
Instance Attribute Details
#access_key_id ⇒ Object
Returns the value of attribute access_key_id.
5 6 7 |
# File 'lib/s3_file_handler/configuration.rb', line 5 def access_key_id @access_key_id end |
#endpoint ⇒ Object
Returns the value of attribute endpoint.
5 6 7 |
# File 'lib/s3_file_handler/configuration.rb', line 5 def endpoint @endpoint end |
#force_path_style ⇒ Object
Returns the value of attribute force_path_style.
5 6 7 |
# File 'lib/s3_file_handler/configuration.rb', line 5 def force_path_style @force_path_style end |
#region ⇒ Object
Returns the value of attribute region.
5 6 7 |
# File 'lib/s3_file_handler/configuration.rb', line 5 def region @region end |
#secret_access_key ⇒ Object
Returns the value of attribute secret_access_key.
5 6 7 |
# File 'lib/s3_file_handler/configuration.rb', line 5 def secret_access_key @secret_access_key end |
Instance Method Details
#client_options ⇒ Object
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/s3_file_handler/configuration.rb', line 11 def opts = { region: region || 'us-east-1', access_key_id: access_key_id, secret_access_key: secret_access_key } opts[:endpoint] = endpoint if endpoint opts[:force_path_style] = force_path_style if force_path_style opts end |