Overview

The Entity class is a popular parent class in SketchUp, meaning you can
attach AttributeDictionaries to almost anything, from geometric items like
edges and faces and components to more conceptual things like pages or
materials.

You access this class not by performing an AttributeDictionaries.new
but by grabbing a handle from an existing entity.

By default, when entity is created it has no AttributeDictionaries object:
g = Sketchup.active_model.entities.add_group
g.attribute_dictionaries # => nil
The AttributeDictionaries object is added to the entity only once the first
attribute is added to the entity:
g.set_attribute("Test", "Yo", "Hello")
g.attribute_dictionaries # => #Sketchup::Group:0x00000007569bc0>
When iterating through entity attribute dictionaries, be sure to verify that
Sketchup::Entity.#attribute_dictionaries is not nil.

Examples:

# Grab the first entity from the model.
my_layer=Sketchup.active_model.entities[0]# Grab a handle to its attribute dictionaries.
attr_dicts=my_layer.attribute_dictionaries