class LightConfig::Configuration

Public Class Methods

new(&block) click to toggle source
# File lib/light_config.rb, line 3
def initialize(&block)
  @properties = {}
  ::LightConfig::Builder.new(self).instance_eval(&block)
  singleton = (class <<self; self; end)
  @properties.keys.each do |property|
    singleton.module_eval do
      define_method property do
        @properties[property]
      end

      define_method "#{property}=" do |value|
        @properties[property] = value
      end
    end
  end
end