Skip to content

Instantly share code, notes, and snippets.

@matthewryanscott
Created July 1, 2016 16:35
Show Gist options
  • Save matthewryanscott/0fc38c25b0fe29405a04604ccc8187f8 to your computer and use it in GitHub Desktop.
Save matthewryanscott/0fc38c25b0fe29405a04604ccc8187f8 to your computer and use it in GitHub Desktop.
class Plantuml < SimpleDelegator
end
module IRuby
module Display
module Registry
type { Plantuml }
format 'image/svg+xml' do |obj|
Tempfile.open('uml') do |uml|
uml.write(obj)
uml.flush
Tempfile.open('svg') do |svg|
`plantuml -p -tsvg < #{uml.path} > #{svg.path}`
svg.read
end
end
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment