How to get absolute transformation?

A model has an componentInstance with transformation1. The instance includes an entity with transformation2. How can I get the absolute transformation of the entity? I did not find how to multiply 2 transformations in SU Ruby API document.

In reality, instances do not have an entities collection, definitions do.
So, the nested instance’s transform is local to the parent definition’s entities origin.

But you need to check if the user is within an editing context because the API returns world coordinates and so forth when in edit mode.

edit_path = model.active_path

if edit_path && edit_path.last == instance1
  abs_trans_2 = transformation2
  abs_trans_2 = transformation1 * transformation2

Thank you very much. Solved.