Sha256: cd8e1c4797a9a28da93ba1abd2573c89154f794e0e13358ed23b3a21289b5103
Contents?: true
Size: 417 Bytes
Versions: 11
Compression:
Stored size: 417 Bytes
Contents
module ChartMogul module ConfigAttributes def config_accessor(attribute, default_value = nil) define_method(attribute) do attr = config.send(attribute) || default_value raise ConfigurationError, "Configuration for #{attribute} not set" if attr.nil? attr end define_method("#{attribute}=") do |val| config.send("#{attribute}=", val) end end end end
Version data entries
11 entries across 11 versions & 1 rubygems