55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
# File 'lib/parse.rb', line 55
def self.parse_content
verbs_annotations = {:gets => [], :posts => [], :puts => [], :deletes => []}
descriptions = {}
type_annotations = AnnotationScanner.scan_annotations(@java_file.head.content)
descriptions.update(ParamDescriptionScanner.scan_params_descriptions(@java_file.head.content))
type_description = remove_params_description(@java_file.head.javadoc)
@java_file.method_blocks.each { |section|
group = AnnotationScanner.scan_annotations(section.content)
group.javadoc = remove_params_description(section.javadoc)
descriptions.update(ParamDescriptionScanner.scan_params_descriptions(section.content))
unless group.empty?
verbs_annotations[:gets] << group if(group.get)
verbs_annotations[:posts] << group if(group.post)
verbs_annotations[:puts] << group if(group.put)
verbs_annotations[:deletes] << group if(group.delete)
end
}
JaxrsDoc::Resource.new(@filename, type_annotations, verbs_annotations, type_description, descriptions)
end
|