lib/bocuse/configuration.rb
def method_missing name, *args
      case args.size
      when 0
        if block_given?
          subconfig = Configuration.new &Proc.new
          store[name] = subconfig
        else
          store[name] ||= Value.new 
        end
      when 1
        store[name] = Value.new args.first
      end
    end
# The main method.
#
# It will react to method calls, install the right keys on the internal
# store and return proxies on which callers can perform operations, e.g.
# <<.
#
# Note: The user only interacts with Configurations. Not with the internal
# values.
#
# Except when the user explicitly takes the
# values out using [].
#
The main method.
It will react to method calls, install the right keys on the internal
store and return proxies on which callers can perform operations, e.g.

The user only interacts with Configurations. Not with the internal
values.

Except when the user explicitly takes the
values out using [].
The main method . It will react to method calls install the right keys on the internal store and return proxies on which callers can perform operations e . g . The user only interacts with Configurations . Not with the internal values . Except when the user explicitly takes the values out using [] .
def method_missing name, *args
      case args.size
      when 0
        if block_given?
          subconfig = Configuration.new &Proc.new
          store[name] = subconfig
        else
          store[name] ||= Value.new 
        end
      when 1
        store[name] = Value.new args.first
      end
    end
def method_missing name , * args case args . size when 0 if block_given? subconfig = Configuration . new & Proc . new store [ name ] = subconfig else store [ name ] ||= Value . new end when 1 store [ name ] = Value . new args . first end end
The main method.
The main method .
name
args