Class: Uploader::UploaderConfig

Inherits:
Object
  • Object
show all
Defined in:
lib/uploader/config.rb

Instance Method Summary collapse

Constructor Details

#initialize(config_hash) ⇒ UploaderConfig

Returns a new instance of UploaderConfig.



5
6
7
8
9
10
11
12
13
14
15
# File 'lib/uploader/config.rb', line 5

def initialize(config_hash)
  @config_hash = config_hash

  (class << self; self; end).class_eval do
    config_hash.each_pair do |key, value|
      define_method(key) do
        value
      end
    end
  end
end