def method_missing(m, *a, &b)
if(a.empty? and b.nil?)
return Pure[@__configuration].send(m, *a, &b)
end
if b
raise ArgumentError unless a.empty?
parent = @__configuration
name = m.to_s
configuration =
if @__configuration.respond_to?(name) and Configuration === @__configuration.send(name)
@__configuration.send name
else
Configuration.new name
end
Pure[configuration].instance_eval{ @__parent = parent }
DSL.evaluate configuration, &b
value = configuration
end
unless a.empty?
value = a.size == 1 ? a.first : a
end
@__singleton_class.module_eval do
define_method(m){ value }
end
end