At the moment, still (https://ruby.sketchup.com/file.LayOut.html:) “developers may utilize the LayOut Ruby API from within their SketchUp application via the console, or in their SketchUp Ruby extension”, but not in Layout natively.
So you can read and manipulate Layout file within your Extension - or from Ruby Console - in SketchUp but you can not save the changes, if the Layout document is opened in Layout. (You will get an error: Error: #<ArgumentError: Could not write to file>)
And, still: LayOut doesn’t have an API interface within the running application at this point.
As far as I now, this will not change in SU-Layout 2023.