Categories: None [Edit]
yard-value
YARD-Value
YARD-Value provides YARD¹ handlers for Value² objects. It’ll document
whether the Value is Comparable and what attributes are used in such
comparisons, its #initialize method, and its protected accessors.
¹ See http://yardoc.org/
² See http://disu.se/software/value-1.0/
You add the documentation to the Module#Value invocation. Any ‹@param› tags
are used both for the parameters to the #initialize method and for the
protected accessors.
This
class Point
# A point on a plane.
# @param [Integer] x
# @param [Integer] y
Value :x, :y
end
generates documentation similar to
class Point
# A point on a plane.
# @param [Integer] x
# @param [Integer] y
def initialize(x, y)
end
and this
class Point
# A point on a plane.
# @param [Integer] x The x coordinate of the receiver
# @param [Integer] y The y coordinate of the receiver
Value :x, :y
end
generates documentation similar to
class Point
# A point on a plane.
# @param [Integer] x
# @param [Integer] y
def initialize(x, y)
protected
# @return [Integer] The x coordinate of the receiver
attr_reader :x
# @return [Integer] The y coordinate of the receiver
attr_reader :y
end
For comparable Values, a note is added about what attributes are used in the
comparison. This
class Point
# A point on a plane.
# @param [Integer] x
# @param [Integer] y
Value :x, :y, :comparable => true
end
is similar to
class Point
# A point on a plane.
# @param [Integer] x
# @param [Integer] y
# @note Comparisons between instances are made between x and y.
def initialize(x, y)
end
§ Usage
Add ‹--plugin yard-value-1.0› to your YARD command line. If you’re
using Inventory-Rake-Tasks-YARD¹, add the following to your Rakefile:
Inventory::Rake::Tasks::YARD.new do |t|
t.o...
Total
Ranking: 54,369 of 183,107
Downloads: 17,931
Daily
Ranking: 86,038 of 183,092
Downloads: 0
Downloads Trends
Ranking Trends
Num of Versions Trends
Popular Versions (Major)
Popular Versions (Major.Minor)
Depended by
Rank | Downloads | Name |
---|---|---|
33,429 | 34,289 | lookout |
Depends on
Rank | Downloads | Name |
---|---|---|
224 | 158,681,269 | yard |
22,630 | 58,827 | inventory |
33,429 | 34,289 | lookout |
34,575 | 32,744 | inventory-rake |
61,713 | 15,140 | lookout-rake |
Owners
# | Gravatar | Handle |
---|---|---|
1 | now |