Guest User

Untitled

a guest
Jan 30th, 2012
1,918
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. = YARD CHEATSHEET http://yardoc.org
  2.  
  3. Templates to remind you of the options and formatting for the different types of objects you might
  4. want to document using YARD.
  5.  
  6. == Modules
  7.  
  8. # Namespace for classes and modules that handle serving documentation over HTTP
  9. # @since 0.6.0
  10.  
  11. == Classes
  12.  
  13. # Abstract base class for CLI utilities. Provides some helper methods for
  14. # the option parser
  15. #
  16. # @author Full Name
  17. # @abstract
  18. # @since 0.6.0
  19. # @attr [Types] attribute_name a full description of the attribute
  20. # @attr_reader [Types] name description of a readonly attribute
  21. # @attr_writer [Types] name description of writeonly attribute
  22. # @deprecated Describe the reason or provide alt. references here
  23.  
  24. == Methods
  25.  
  26. # An alias to {Parser::SourceParser}'s parsing method
  27. #
  28. # @author Donovan Bray
  29. #
  30. # @see http://example.com Description of URL
  31. # @see SomeOtherClass#method
  32. #
  33. # @deprecated Use {#my_new_method} instead of this method because
  34. # it uses a library that is no longer supported in Ruby 1.9.
  35. # The new method accepts the same parameters.
  36. #
  37. # @abstract
  38. # @private
  39. #
  40. # @param [Hash] opts the options to create a message with.
  41. # @option opts [String] :subject The subject
  42. # @option opts [String] :from ('nobody') From address
  43. # @option opts [String] :to Recipient email
  44. # @option opts [String] :body ('') The email's body
  45. #
  46. # @param (see User#initialize)
  47. # @param [OptionParser] opts the option parser object
  48. # @param [Array<String>] args the arguments passed from input. This
  49. # array will be modified.
  50. # @param [Array<String, Symbol>] list the list of strings and symbols.
  51. #
  52. # The options parsed out of the commandline.
  53. # Default options are:
  54. # :format => :dot
  55. #
  56. # @example Reverse a string
  57. # "mystring.reverse" #=> "gnirtsym"
  58. #
  59. # @example Parse a glob of files
  60. # YARD.parse('lib/**/*.rb')
  61. #
  62. # @raise [ExceptionClass] description
  63. #
  64. # @return [optional, types, ...] description
  65. # @return [true] always returns true
  66. # @return [void]
  67. # @return [String, nil] the contents of our object or nil
  68. # if the object has not been filled with data.
  69. #
  70. # We don't care about the "type" here:
  71. # @return the object
  72. #
  73. # @return [String, #read] a string or object that responds to #read
  74. # @return description here with no types
  75.  
  76. == Anywhere
  77.  
  78. # @todo Add support for Jabberwocky service
  79. # There is an open source Jabberwocky library available
  80. # at http://somesite.com that can be integrated easily
  81. # into the project.
  82.  
  83. == Blocks
  84.  
  85. # for block {|a, b, c| ... }
  86. # @yield [a, b, c] Description of block
  87. #
  88. # @yieldparam [optional, types, ...] argname description
  89. # @yieldreturn [optional, types, ...] description
RAW Paste Data