Class: FileStore::Config
- Inherits:
-
Object
- Object
- FileStore::Config
- Defined in:
- lib/file_store/config.rb
Constant Summary collapse
- VALID_CONFIGS =
[:aws_access_key, :aws_access_secret, :aws_s3_bucket, :aws_region].freeze
Instance Method Summary collapse
-
#config ⇒ Object
Set up accessors for the config fields.
-
#initialize ⇒ Config
constructor
A new instance of Config.
- #to_h ⇒ Object
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
6 7 8 |
# File 'lib/file_store/config.rb', line 6 def initialize @_config_hash = {} end |
Instance Method Details
#config ⇒ Object
Set up accessors for the config fields
12 13 14 15 |
# File 'lib/file_store/config.rb', line 12 VALID_CONFIGS.each { |config| define_method(config) { @_config_hash[config] } define_method("#{config}=") { |value| @_config_hash[config] = value } } |
#to_h ⇒ Object
17 18 19 |
# File 'lib/file_store/config.rb', line 17 def to_h @_config_hash end |