Sha256: 699888353d78038e577de47989d5e380af08b75bee37dddd292ee5ad3ea5586c
Contents?: true
Size: 1.14 KB
Versions: 1
Compression:
Stored size: 1.14 KB
Contents
# Gliffynator [](https://travis-ci.org/timothypage/gliffynator) make gliffy diagrams in ruby! ## simple DSL diagram = Gliffynator::Diagram.new do add_arrow 50, 50, 100, :right, "Some Text" end diagram.render or diagram = Gliffynator::Diagram.new diagram.add_arrow 50, 50, 100, :right, "Some Text" diagram.render the DSL will keep track of some basic housekeeping, like unique IDs for most objects and their children. If this isn't done, your document may appear correctly until you try and edit it, when moving one thing might cause other side effects! ## Usage you can save a diagram to a file, just make sure it ends in `.gliffy` diagram.render "example.gliffy" or you can get at the raw text (which is just json). this is useful for downloading a file from a Sinatra application, for example get '/example.gliffy' do header 'Content-Type', 'text/plain' header 'Content-Disposition', 'attachment' body diagram.render end ## Contributing tests are in `spec/` and are run with `rake`. Feel free to add some tests :)
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
gliffynator-0.0.1 | README.md |