Class: PorkyLib::Config
- Inherits:
-
Object
- Object
- PorkyLib::Config
- Defined in:
- lib/porky_lib/config.rb
Class Attribute Summary collapse
-
.config ⇒ Object
readonly
Returns the value of attribute config.
- .logger ⇒ Object
Class Method Summary collapse
Class Attribute Details
.config ⇒ Object (readonly)
Returns the value of attribute config.
37 38 39 |
# File 'lib/porky_lib/config.rb', line 37 def config @config end |
.logger ⇒ Object
40 41 42 43 |
# File 'lib/porky_lib/config.rb', line 40 def self.logger @logger ||= defined?(Rails) ? Rails.logger : Logger.new($stdout) @logger end |
Class Method Details
.configure(options = {}) ⇒ Object
22 23 24 |
# File 'lib/porky_lib/config.rb', line 22 def self.configure( = {}) .each { |key, value| @config[key.to_sym] = value if @allowed_config_keys.include? key.to_sym } end |
.initialize_aws ⇒ Object
26 27 28 29 30 31 32 33 34 |
# File 'lib/porky_lib/config.rb', line 26 def self.initialize_aws Aws.config.update( region: @config[:aws_region], credentials: Aws::Credentials.new( @config[:aws_key_id], @config[:aws_key_secret] ) ) end |