module SupermarketSync::Config
> This is the Configuration
module.¶ ↑
Public Instance Methods
add(config = {})
click to toggle source
Facilitate Dynamic Addition of Configuration
Values
@return [class_variable]
# File lib/supermarket_sync/config.rb, line 55 def add(config = {}) config.each do |key, value| define_setting key.to_sym, value end end
clear(config)
click to toggle source
Facilitate Dynamic Removal of Configuration
Values
@return nil
# File lib/supermarket_sync/config.rb, line 66 def clear(config) Array(config).each do |setting| delete_setting setting end end
options()
click to toggle source
List the Configurable Keys as a Hash
@return [Hash]
# File lib/supermarket_sync/config.rb, line 77 def options map = SupermarketSync::Config.class_variables.map do |key| [key.to_s.tr('@', '').to_sym, class_variable_get(:"#{key}")] end Hash[map] end