Hi everyone, I need to open a layout file from a url.
I know that opening a file from a url is as simple as doing this:
doc = open('file.layout', 'wb') do |file|
data << open("url/file.layout").read
end
but then, I need to use this file as a Layout format using his API, so I need to convert this file to Layout doc (Layout::Document…) to do something like this:
defs = doc.auto_text_definitions
The idea is to do this:
doc = Layout::Document.open('file.layout', 'wb') do |file|
data << open("url/file.layout").read
end
but open method from layout’s api does not accept 2 arguments