Skip to content

Instantly share code, notes, and snippets.

@darrenboyd
Created November 2, 2011 18:57
Show Gist options
  • Save darrenboyd/1334529 to your computer and use it in GitHub Desktop.
Save darrenboyd/1334529 to your computer and use it in GitHub Desktop.
Example of using @method
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
@darrenboyd
Copy link
Author

That Ruby, will create RDoc that looks like this...

https://img.skitch.com/20111102-692wm4pw716n9eq1a76u9ee5h.jpg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment