# File lib/scruffy/helpers/layer_container.rb, line 27
    def <<(*args, &block)
      if args[0].kind_of?(Scruffy::Layers::Base)
        layers << args[0]
      else
        type = args.first.is_a?(Symbol) ? args.shift : @default_type
        title = args.shift if args.first.is_a?(String)
        points = args.first.is_a?(Array) ? args.shift : []
        options = args.first.is_a?(Hash) ? args.shift : {}
        
        title ||= ''
        
        raise ArgumentError, 
                'You must specify a graph type (:area, :bar, :line, etc) if you do not have a default type specified.' if type.nil?
        
        layer = Kernel::module_eval("Scruffy::Layers::#{to_camelcase(type.to_s)}").new(options.merge({:points => points, :title => title}), &block)
        layers << layer
      end
      layer
    end