Yard warning with @param tag

I tried to document some Ruby code using yard, and although I am doing exactly what is described here or here

# @param [Integer] the number of trials (>= 0)
# @param [Float] success probability in each trial
def initialize(n, p)
  # initialize...
end 

I still get this weird error though

@param tag has unknown parameter name: the
@param tag has unknown parameter name: success

and then the generated html looks wierd. I call yardthis:

$ yard doc -m markdown

What can i do wrong?

+5
source share
1 answer

doc says the @param tag has the format

@param [Type] name description

and your lines do not include parameter names (n and p respectively)

+8
source

All Articles