Sha256: dce9346338f5777693174579f611d5686988e678906fb73a4cb82d5fbbf30200
Contents?: true
Size: 1.88 KB
Versions: 13
Compression:
Stored size: 1.88 KB
Contents
module Inch module Language module Nodejs module Provider module JSDoc module Object # Proxy class for function parameters class FunctionParameterObject attr_reader :name # @return [String] # @param method [YARD::Object::MethodObject] the method the # parameter belongs to # @param name [String] the name of the parameter def initialize(method, name) @method = method @name = name end # @return [Boolean] +true+ if the parameter is a block def block? false end # @return [Boolean] +true+ if an additional description is given? def described? described_by_docstring? end # @return [Boolean] +true+ if the parameter is mentioned in the # docs def mentioned? mentioned_by_docstring? end # @return [Boolean] +true+ if the parameter is a splat argument def splat? false end # @return [Boolean] +true+ if the type of the parameter is defined def typed? false # TODO: parse types of params end # @return [Boolean] +true+ if the parameter is mentioned in the # docs, but not present in the method's signature def wrongly_mentioned? false end private def described_by_docstring? @method.docstring.describes_parameter?(name) end def mentioned_by_docstring? @method.docstring.mentions_parameter?(name) end end end end end end end end
Version data entries
13 entries across 13 versions & 1 rubygems