Sha256: 9500987892a868979b85d3c59ff8105c6ee0a6c52a98f5027697ec17ed8effd6
Contents?: true
Size: 1.88 KB
Versions: 31
Compression:
Stored size: 1.88 KB
Contents
module Inch module Language module Elixir module Provider module Reader 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
31 entries across 31 versions & 1 rubygems