RosettaCodeData/Task/Documentation/Fancy/documentation.fancy
Ingy döt Net db842d013d A-M baby
2013-04-10 21:29:02 -07:00

13 lines
417 B
Text

def class Foo {
"""
This is a docstring. Every object in Fancy can have it's own docstring.
Either defined in the source code, like this one, or by using the Object#docstring: method
"""
def a_method {
"""
Same for methods. They can have docstrings, too.
"""
}
}
Foo docstring println # prints docstring Foo class
Foo instance_method: 'a_method . docstring println # prints method's docstring