Created
July 1, 2016 16:35
-
-
Save matthewryanscott/0fc38c25b0fe29405a04604ccc8187f8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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