Created
November 2, 2011 18:57
-
-
Save darrenboyd/1334529 to your computer and use it in GitHub Desktop.
Example of using @method
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Stuff | |
def create_dynamic_method | |
end | |
end | |
class Foo | |
extend Stuff | |
# Tells you what is static | |
# | |
# @method static_method | |
# @return [String] | |
def static_method | |
'static' | |
end | |
# Tells you what is dynamic | |
# | |
# @method dynamic_method | |
# @return [String] | |
create_dynamic_method :dynamic_method | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
That Ruby, will create RDoc that looks like this...
https://img.skitch.com/20111102-692wm4pw716n9eq1a76u9ee5h.jpg