When I import a skp file, the attribute dictionaries of layers in the skp file.
layer = Sketchup.active_model.layers.add 'test_layer'
layer.set_attribute 'Test', 'attr', 'is_me'
Sketchup.active_model.entities.to_a[0].layer = layer
puts "layer attr : #{layer.get_attribute('Test', 'attr')}"
file_path = 'test.skp'
Sketchup.active_model.save(file_path)
Sketchup.file_new
Sketchup.active_model.definitions.load file_path
layer = Sketchup.active_model.layers['test_layer']
puts "layer attr : #{layer.get_attribute('Test', 'attr')}"
# output
# layer attr : is_me
# layer attr :