(PDOC-21) Check mismatched types in defined types
Check that the types for defined types match those specified in the documentation. This is already being done for classes.
This commit is contained in:
parent
b1b27a33d3
commit
c7af917c35
|
@ -8,6 +8,12 @@ def init
|
||||||
|
|
||||||
@template_helper = TemplateHelper.new
|
@template_helper = TemplateHelper.new
|
||||||
@html_helper = HTMLHelper.new
|
@html_helper = HTMLHelper.new
|
||||||
|
@template_helper.check_parameters_match_docs object
|
||||||
|
params = object.parameters.map { |param| param.first }
|
||||||
|
param_tags = object.tags.find_all{ |tag| tag.tag_name == "param"}
|
||||||
|
param_details = @template_helper.extract_param_details(params, param_tags) unless params.nil?
|
||||||
|
@template_helper.check_types_match_docs object, param_details
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def parameter_details
|
def parameter_details
|
||||||
|
@ -19,7 +25,6 @@ def parameter_details
|
||||||
@param_details = []
|
@param_details = []
|
||||||
|
|
||||||
@param_details = @template_helper.extract_param_details(params, param_tags, true)
|
@param_details = @template_helper.extract_param_details(params, param_tags, true)
|
||||||
@template_helper.check_parameters_match_docs object
|
|
||||||
|
|
||||||
erb(:parameter_details)
|
erb(:parameter_details)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue