Ruby Docs
-
In my tutorial I suggest using a spare browser as a reference guide. One tab for the SketchUp Ruby API, another for Ruby, more for JavaScript, CSS and HTML.
I use this setup and it's very helpful, except for Ruby. My tab is http://ruby-doc.org/core/. In practice I find it's faster to do a Google search.
For the rest I've found references that I'm happy with, but not for Ruby. Suggestions?
-
I've been using the system and I like this reference:
-
@chris fullmer said:
I've been using the system and I like this reference:
http://www.ruby-doc.org/docs/ProgrammingRuby/For Ruby, I use the Win32 CHM version of the above.
And I find I wind up with multiple tabs into the SU API open in MSIE.
For the others (JS, HTML, etc.) I have links into MSDN.The chm version is distro'd with Ruby ver 1.8.6Remove the ".txt" to use
EDIT: This chm version (and the online version) are for Ruby 1.6.x, so it's actually way out of date (missing methods etc.)
-
Martin, Thats a good one, thanks.
Chris, While that is one I have booked marked, I often need a more baby one. Any suggestions?
-
@honoluludesktop said:
I often need a more baby one. Any suggestions?
-
@honoluludesktop said:
... I often need a more baby one. Any suggestions?
How about a Ruby Cheatsheet?
Ruby QuickRef
http://www.zenspider.com/Languages/Ruby/QuickRef.html -
@dan rathbun said:
@honoluludesktop said:
... I often need a more baby one. Any suggestions?
How about a Ruby Cheatsheet?
Ruby QuickRef
http://www.zenspider.com/Languages/Ruby/QuickRef.html -
This should be a matter of exporting and sharing our ruby docs bookmarks, but somehow exporting a sub-set is not an option. How can bookmark support be so poor in Firefox?
-
@jim said:
This should be a matter of exporting and sharing our ruby docs bookmarks, ...
Well in IE, the bookmarks (favorites,) are nothing more than folders with shortcut (.lnk) files in them. They are the same as the StartMenu folders.
Can you IMPORT the Firefox bookmarks into MSIE favorites (using something built-in to MSIE) ??
But does the Mac use .lnk files?
How about a script (in some scripting language,) that can go thru a folder of .lnk files, and write out an HTML page, converting the info in each .lnk file to a standard HTML <A> element??
Seems we are condemned to jump thru hoops and always take the long way around, to do anything that should be simple.
-
@dan rathbun said:
How about a script (in some scripting language,) that can go thru a folder of .lnk files, and write out an HTML page, converting the info in each .lnk file to a standard HTML <A> element??
UPDATE: They are NOT LNK files, they are TXT files with no extension.
Here's the file contents for the QucikRef link I posted above.[DEFAULT] BASEURL=http://www.zenspider.com/Languages/Ruby/QuickRef.html [InternetShortcut] URL=http://www.zenspider.com/Languages/Ruby/QuickRef.html#36 IDList= IconFile=http://www.zenspider.com/favicon.ico IconIndex=1 [{000214A0-0000-0000-C000-000000000046}] Prop3=19,2
The file name is the "favorite/bookmark title".
I think the GUID section is the Windows CLSID of the Internet Shortcut Handler. -
@dan rathbun said:
How about a Ruby Cheatsheet?
Ruby QuickRef
http://www.zenspider.com/Languages/Ruby/QuickRef.htmlExcellent!
I took the liberty of converting the cheatsheet to lowercase tags and attributes, then fiddled with the TOC a bit. I've written the author requesting permission to continue fiddling.
-
@martinrinehart said:
Excellent!
By the way there is more Ruby stuff if you go up on level to his "Ruby" folder, and more stuff on other languages if up go up to his "Language Freak" level.
-
Found a better version of the 'Pick-Axe' Ruby book online:
The layout is much better (tables listing methods are much more clear.)There is a link to download the entire site as a tar
-
Oooh I like that Dan! Thanks!
Chris
-
-
post moved
@wsellers89 said:
Is there a good reference or tutorials for learning more about Ruby on SketchUp?
Free downloadable PDF version of "Automatic SketchUp" at Google Docs (Look for the download link in the upper-left of toolbar.)
EDIT: As of JULY 2010 Google reports "Sorry, the page (or document) you have requested is not available." Try the author's website: Automatic SketchupYou ALSO need to learn some standard Ruby, the old 'Pick-Axe' book "The Pragmatic Programmer's Guide: Programming Ruby"
http://phrogz.net/ProgrammingRuby/frameset.html
(There is a tar download link at the bottom of the left pane.)@wsellers89 said:
I am experienced in Fortran and to a less extent C, but I can follow most of the the code.
The weirdest thing about Ruby (and it's kept secret from newbies, I guess to surprise them in the advanced course?,) is that Ruby has no actual variables like BASIC, Pascal, or FORTRAN. Read this post for more info:
[url=http://forums.sketchucation.com/viewtopic.php?f=180&t=26437#p230201:2y8qpfiu]By value or by reference?[/url:2y8qpfiu]
I personally would ALWAYS tell experienced programmers about this FIRST thing, as it can and has led to much wasted time and frustration.@wsellers89 said:
I am not sure what ".to_f" does in the loop to parse out the x,y points and would like to know more.
Converts the object (on the left of the dot,) to a Float class.
This is one of the standard Ruby instance methods.
[url=http://phrogz.net/ProgrammingRuby/builtins.html#builtinclassesandmethods:2y8qpfiu]Built-In Class and Methods[/url:2y8qpfiu]This old 'Pick-Axe' version was written for Ruby 1.6.x, but still helps alot. Sketchup is using the 1.8.x branch, but the book is still say 95% valid. Ver 1.8.x renamed a few Exceptions, added some more methods, etc. (There are updated hardcopy books available for sale for the 1.8.x and 1.9.x branch. Check booksellers or Ebay.)
Other Topics here at SketchUcation on Ruby Programming:
[url=http://forums.sketchucation.com/viewtopic.php?f=180&t=10142:2y8qpfiu]SketchUp-Ruby Resources[/url:2y8qpfiu]
[url=http://forums.sketchucation.com/viewtopic.php?f=180&t=20427:2y8qpfiu]Developer Forum Sticky Links[/url:2y8qpfiu]
[url=http://forums.sketchucation.com/viewtopic.php?f=180&t=27606:2y8qpfiu]Ruby Docs[/url:2y8qpfiu] this topic(pssst! You can bookmark topics and access your bookmarks through your User Control Panel. The link is a the top left of each forum just below the list of Moderators. The bookmark button is hidden all the way at the bottom of each topic webpage in the footerbar.)
Advertisement