bakkdoor / fancy

Fancy is a dynamic, object-oriented programming language inspired by Smalltalk, Ruby, Io and Erlang that runs on the Rubinius VM.
http://www.fancy-lang.org
BSD 3-Clause "New" or "Revised" License
261 stars 22 forks source link

fdoc - API documentation generator. #45

Closed vic closed 14 years ago

vic commented 14 years ago

Now we have class/method documentation strings implemented in fancy, we could start writing the "fdoc" tool to generate documentation from fancy source. We could use markdown for docstrings.

I'd like it to generate something similar to..

http://rubydoc.info/docs/ruby-core/1.9.2/frames

Maybe we could reuse their templates.

Btw, you can set documentation strings for any method (even ruby ones of course)

 String instance_method: 'split . documentation: "Split an string by separator (ruby-method)"

 Fixnum documentation: "Class for fixed numbers."
bakkdoor commented 14 years ago

It would be nice to have a method's signature in the docs as well, e.g. if you write:

def foo: bar bar: baz {
  """
  This is my docstring.
  """
}

It would output something like this as the documentation:

foo: bar bar: baz
This is my docstring.

Or something similar. The point is to not only have the method name itself (foo:bar:) but also the argument names.

vic commented 14 years ago

Good, count on it.

Done. Documented methods display the arg name they use. We have a 'meta slot on Documentation objects we use to store a hash like <[ 'args => ['bar, 'baz] ]>

bakkdoor commented 14 years ago

Idea: For each method, allow to see the source for that method as well. E.g. as here: http://ruby-doc.org/core/classes/Array.html#M002175 If you click on the method name, you see the code. Note: We can add this later, just an idea I had and wanted to write down for later.

vic commented 14 years ago

Cool , i'll implement this.

bakkdoor commented 14 years ago

Great =D