Ruby API Reference

For general discussion related FlowStone
User avatar
trogluddite
Posts: 1730
Joined: Fri Oct 22, 2010 12:46 am
Location: Yorkshire, UK

Ruby API Reference

Post by trogluddite »

Hi All,
Here's a little something for all of the Rubyists here who just need a quick way to look up the Class and Method definitions for FlowStone's custom Ruby objects. I'll keep it here in the top post where it's easy to find, and let you know each time I tweak anything
FS_API_docs 1_0_0.zip
v1.0.0 28-June-2014
(184.06 KiB) Downloaded 22584 times

To install, just unzip the file anywhere that you like (making sure to keep all the folders in the same structure). Navigate to the main folder, where you'll find a load of .html docs. Just double click the one called 'index.html', and it will open in your default browser.

Classes and methods are all linked within the doc's - just click on one to navigate to the page you're looking for, and you'll see a definition of the method signatures, a bit of text about what each one does, and code examples for the ones that need a bit more explaining.

There's also a 'fake' class called "API_Notes" - click on that one to get a page that describes how to make sense of the info and defines a few common terms and conventions.

The pages have all been generated using the 'rdoc' document generator from a "standard" Ruby install, so the format is exactly the same as you'll see for the API documentation for standard Ruby classes and methods - and it makes it nice and simple to maintain, so not half as much work as it might seem!

Hope you find it useful,
Trog.
Last edited by trogluddite on Sat Jun 28, 2014 12:53 am, edited 1 time in total.
Reason: New version uploaded.
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
User avatar
JB_AU
Posts: 171
Joined: Tue May 21, 2013 11:01 pm

Re: Ruby API Reference

Post by JB_AU »

Thanks
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."

Albert Einstein
Drnkhobo
Posts: 312
Joined: Sun Aug 19, 2012 7:13 pm
Location: ZA

Re: Ruby API Reference

Post by Drnkhobo »

Awesomeness!

Thanks Trog!

:D :D :D
User avatar
trogluddite
Posts: 1730
Joined: Fri Oct 22, 2010 12:46 am
Location: Yorkshire, UK

Re: Ruby API Reference

Post by trogluddite »

You're welcome! :)

Next version now uploaded in the top posts. Just Views, GraphicsPaths, and various flavours of Gradient/Texture brushes left to go!
Not as much detail on the newer stuff (especially, no code examples yet) - but I decided to just get an outline of as much as possible hammered out quickly. I can then add the detail as it becomes clear over time what people most need to know.

Oh, and I forgot to mention - if anyone notices any mistakes, or anything that doesn't work as described, just post it up, and I'll tweak the docs to keep everything as accurate as possible.
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
RJHollins
Posts: 1573
Joined: Thu Mar 08, 2012 7:58 pm

Re: Ruby API Reference

Post by RJHollins »

ok ... finally got to view some of this via my web browser.

This looks to be an excellent compliment to the FS manuals.

Thanks TROG !
8-)
Exo
Posts: 426
Joined: Wed Aug 04, 2010 8:58 pm
Location: UK
Contact:

Re: Ruby API Reference

Post by Exo »

Great idea Trog thanks, just learning Ruby so this will come in handy :).
Flowstone Guru. Blog and download site for Flowstone.
Best VST Plugins. Initial Audio.
billv
Posts: 1165
Joined: Tue Aug 31, 2010 3:34 pm
Location: Australia
Contact:

Re: Ruby API Reference

Post by billv »

trogluddite wrote:It is WAY off being finished, as I just spend a few minutes here and there tinkering with it whenever the fancy takes me, so it may be a while before it's complete. I'll keep it here in the top post where it's easy to find, and let you know each time I add a new bit...


:lol: :lol: I knew sooner or later we'd get you to start writing a book... :D
Great stuff trog....love the format..looks like exactly what FS needs....thanks

PS:
maybe some other gurus can help out, and you can palm off a section or 2, ease the load..
It's a great looking project, a little wiki in itself, hopefully those who can help - will
tester
Posts: 1786
Joined: Wed Jan 18, 2012 10:52 pm
Location: Poland, internet

Re: Ruby API Reference

Post by tester »

Not such a bad idea.
I could write another book. :mrgreen:

it would take 3-6 months I guess.
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
User avatar
trogluddite
Posts: 1730
Joined: Fri Oct 22, 2010 12:46 am
Location: Yorkshire, UK

Re: Ruby API Reference

Post by trogluddite »

billv wrote: I knew sooner or later we'd get you to start writing a book..

:lol: Well, more like a "cheat sheet plus", I think. As RJ says, intended more as a complement to to the User Guide than a replacement for it - I just got fed up with having to scan through the text of the guide just to remind myself exactly what values I was supposed to be passing to the methods.

What I find really interesting is just how many methods I keep finding that aren't mentioned in the manual at all. For the 'Midi' class there are more undocumented methods than there are documented ones! For example, you can change the channel of a message with a simple ".channel=" - much more efficient than allocating some more memory to create a whole new Midi object, and making less "garbage" for Ruby to clean up afterwards.

billv wrote:maybe some other gurus can help out,

I'll see how I get on, but I think there's not a huge amount left to do to get the basic method references finished - mostly just the vector graphics stuff (the "standard" Ruby classes are already in the official Ruby API docs, so I won't be touching those!).
I've no problem with posting the source files. But I'd rather not have to write a second "book" about how to write the source markup and get 'rdoc' to create the HTML. Ironically, the auto-documentation features are one of the worst documented parts of Ruby - and it means having to mess about installing the full "non-FS" version of Ruby, external code editor etc...
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
User avatar
trogluddite
Posts: 1730
Joined: Fri Oct 22, 2010 12:46 am
Location: Yorkshire, UK

Re: Ruby API Reference

Post by trogluddite »

Dunnit! 8-)
New download (v1.0.0) is now available in the top post - all 117 Methods in 17 Classes now present!

There's also a 'dummy' class called "API_Notes" - if you click on that one, you get a guide how to make sense of the info (much of which also applies to the standard Ruby API docs).
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
Post Reply