• Login
sketchucation logo sketchucation
  • Login
ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

Yardoc for ruby api

Scheduled Pinned Locked Moved Developers' Forum
14 Posts 6 Posters 600 Views 6 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    Jim
    last edited by 5 Nov 2011, 14:49

    As another experiment in collaborative documentation of SketchUp's Ruby API, I set up a github repo of some "mock" api source code.

    So now the site http://rubydoc.info/ (a YARD documentation server) automatically creates (and hosts) the api documentation directly from the github repo.

    If interested in writing docu, you have a couple options:

    1. I could add people as collaborators to the project, in which case you would be able to edit and push changes directly using git, or

    2. You can just clone, edit, and then make pull requests; in which I would need to decide to accept the edits and merge them into the main repo.

    Let me know what you think, and if you're interested in being a collaborator.

    Hi

    1 Reply Last reply Reply Quote 0
    • T Offline
      thomthom
      last edited by 5 Nov 2011, 15:53

      Sounds interesting. Sign me up.

      Thomas Thomassen — SketchUp Monkey & Coding addict
      List of my plugins and link to the CookieWare fund

      1 Reply Last reply Reply Quote 0
      • J Offline
        Jim
        last edited by 5 Nov 2011, 19:33

        @thomthom said:

        Sounds interesting. Sign me up.

        You should be able to push directly, thanks.

        Hi

        1 Reply Last reply Reply Quote 0
        • J Offline
          Jim
          last edited by 6 Nov 2011, 13:03

          I have the basic hierarchy set up for the classes and modules. It's nice to be able to see all of a classes methods and inherited methods on a single page ; for example Sketchup::Edge.

          0118.png

          The next most important work is to add @return tags to as many methods as possible in order to enable linking the return values to the documentation for the returned type.

          For example, the following would enable linking back to the Array class in the documentation, which is handy when following the method lookup chain of SketchUp objects.

          module Sketchup
            class Edge
              # @return [Array] an array of connected entities plus the edge itself.
              def all_connected
              end
            end
          end
          

          See the yard guide for more info.

          Hi

          1 Reply Last reply Reply Quote 0
          • D Offline
            Dan Rathbun
            last edited by 7 Nov 2011, 17:47

            Looks nice so far !

            I'm not here much anymore.

            1 Reply Last reply Reply Quote 0
            • J Offline
              jolran
              last edited by 7 Nov 2011, 18:18

              Yeah, this looks really great. Thanks for doing this!

              1 Reply Last reply Reply Quote 0
              • J Offline
                Jim
                last edited by 7 Nov 2011, 23:03

                @dan rathbun said:

                Looks nice so far !

                @jolran said:

                Yeah, this looks really great. Thanks for doing this!

                Thanks.

                Did you know you can do online edits right on github? Should I sign you up? 😉

                Hi

                1 Reply Last reply Reply Quote 0
                • T Offline
                  thomthom
                  last edited by 12 Nov 2011, 21:46

                  I really want to add info to UI::WebDialog and Geom::PolygonMesh which is areas where the official docs are lacking and/or often plain wrong! I got a bit much on my plate right now, but I'll get around to it.

                  Thomas Thomassen — SketchUp Monkey & Coding addict
                  List of my plugins and link to the CookieWare fund

                  1 Reply Last reply Reply Quote 0
                  • J Offline
                    jolran
                    last edited by 13 Nov 2011, 08:46

                    @unknownuser said:

                    Did you know you can do online edits right on github? Should I sign you up?

                    I'm afraid of messing things up 😳

                    I mean, maybe it's best if these things are done by proffessionals.

                    1 Reply Last reply Reply Quote 0
                    • C Offline
                      Chris Fullmer
                      last edited by 13 Nov 2011, 21:00

                      I feel the same.

                      But Github has version history, so if you mess something up, one of the professionals sxhould be able to undo your changes if I recall correctly.

                      I'm hoping maybe this will be a good chance for me to learn how to work on one of these collaborative projects. I never really got into it that last time (skx, etc).

                      Lately you've been tan, suspicious for the winter.
                      All my Plugins I've written

                      1 Reply Last reply Reply Quote 0
                      • T Offline
                        thomthom
                        last edited by 13 Nov 2011, 21:28

                        Go for it! 😄
                        These docs can easily become better than the official.

                        Thomas Thomassen — SketchUp Monkey & Coding addict
                        List of my plugins and link to the CookieWare fund

                        1 Reply Last reply Reply Quote 0
                        • D Offline
                          Dan Rathbun
                          last edited by 13 Nov 2011, 21:52

                          Bookmark these links:

                          YARD Features

                          YARD Tags

                          I'm not here much anymore.

                          1 Reply Last reply Reply Quote 0
                          • B Offline
                            bigcatln
                            last edited by 17 Nov 2011, 07:49

                            Sounds a good idea,support!

                            1 Reply Last reply Reply Quote 0
                            • J Offline
                              Jim
                              last edited by 26 May 2012, 14:09

                              Added some new methods that came in version 8.0 M2. https://github.com/jimfoltz/SketchUp-Ruby-API-Doc

                              The new GitHub Windows client makes it very easy to contribute.

                              Hi

                              1 Reply Last reply Reply Quote 0
                              • 1 / 1
                              • First post
                                Last post
                              Buy SketchPlus
                              Buy SUbD
                              Buy WrapR
                              Buy eBook
                              Buy Modelur
                              Buy Vertex Tools
                              Buy SketchCuisine
                              Buy FormFonts

                              Advertisement