diff --git a/lib/doorkeeper/config.rb b/lib/doorkeeper/config.rb
index <HASH>..<HASH> 100644
--- a/lib/doorkeeper/config.rb
+++ b/lib/doorkeeper/config.rb
@@ -47,10 +47,16 @@ module Doorkeeper
       #
       def option(name, options = {})
         attribute = options[:as] || name
+        attribute_builder = options[:builder_class]
 
         Builder.instance_eval do
           define_method name do |*args, &block|
-            value = block ? block : args.first
+            value = unless attribute_builder
+              block ? block : args.first
+            else
+              attribute_builder.new(&block).build
+            end
+
             @config.instance_variable_set(:"@#{attribute}", value)
           end
         end
Introduce ability to define config values with Builder

When you set up builder_class for the option then you can have embedded
DSL. So something like

Doorkeeper.configure do
	attribute_method do
		#inner DSL for given attribute
	end
end

is possible.

The builder for attributes should act just like config attribute - it
takes the block for the initializer and then the method build returns
the value for the attribute.