def [](key, *rest)
      case
      when key.is_a?(Range)
        by_range key
      when !rest.empty?
        by_multi_key key, *rest
      else
        by_single_key key
      end
    end
def [](key, *rest)
      case
      when key.is_a?(Range)
        by_range key
      when !rest.empty?
        by_multi_key key, *rest
      else
        by_single_key key
      end
    end
@example

   idx = Daru::Index.new [:one, 'one', 1, 2, :two]
   => #<Daru::Index(5): {one, one, 1, 2, two}>

   # set the name

   idx.name = "index_name"
   => "index_name"

   idx
   => #<Daru::Index(5): index_name {one, one, 1, 2, two}>

   # set the name during initialization

   idx = Daru::Index.new [:one, 'one', 1, 2, :two], name: "index_name"
   => #<Daru::Index(5): index_name {one, one, 1, 2, two}>